waibu-maps 2.7.0 → 2.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -25,8 +25,9 @@ async function controlNewsticker () {
25
25
  static inlineCss = `
26
26
  :root { --at-gtr: 0 }
27
27
  .at-ticker-label { --at-bg-cl: #f00 }
28
- .at-ticker-box { font-size: larger }
28
+ .at-ticker-box { font-size: larger; padding-right: 10px }
29
29
  .at-ticker-box ul { padding-top: 5px }
30
+ .text-content { max-height: calc(100vh - 600px); overflow-y: auto }
30
31
  `
31
32
 
32
33
  constructor (options) {
@@ -49,16 +50,16 @@ async function controlNewsticker () {
49
50
  let rsc = ''
50
51
  if (att) {
51
52
  if (att.mimeType.startsWith('video')) {
52
- rsc = '<iframe style="max-height:600px; min-height:400px; width:100%" frameborder="0" allowfullscreen scrolling="no" allow="camera; microphone; fullscreen" src="' + att.url + '"></iframe>'
53
+ rsc = '<iframe style="height:400px; width:100%" frameborder="0" allowfullscreen scrolling="no" allow="camera; microphone; fullscreen" src="' + att.url + '"></iframe>'
53
54
  } else {
54
- rsc = '<img style="max-height:600px" class="img-fluid" src="' + att.url + '">'
55
+ rsc = '<img style="height:400px" class="img-fluid" src="' + att.url + '">'
55
56
  }
56
57
  }
57
58
  const html = '<div class="d-flex border-bottom justify-content-center">' +
58
59
  rsc +
59
- '</div><div class="px-3 py-2"><h5>' + item.title + '</h5>' +
60
+ '</div><div class="px-3 py-2"><h5>' + item.title + '</h5><div class="text-content">' +
60
61
  item.content.replaceAll('\\n', '<br>') +
61
- '</div>'
62
+ '</div></div>'
62
63
 
63
64
  smaps.showDetails(html, { title: item.category })
64
65
  const el = document.querySelector('.maplibregl-ctrl-newsticker .content')
@@ -74,13 +75,16 @@ async function controlNewsticker () {
74
75
  if (window.newsticker) window.newsticker.destroy()
75
76
  const el = document.querySelector('.maplibregl-ctrl-newsticker .content')
76
77
  el.innerHTML = ''
77
- this.posts = await wmpa.fetchApi('/cms/post', { headers: { 'X-Attachments': 'true' } })
78
+ this.posts = await wmpa.fetchApi('/cms/post', { headers: { 'X-Attachments': 'true' } }, { limit: 1 })
78
79
  this.posts.forEach(post => {
79
80
  const li = document.createElement('li')
80
81
  const a = document.createElement('a')
81
82
  a.href = '#'
82
83
  a.classList.add('text-decoration-none')
83
- a.textContent = post.title
84
+ a.classList.add('text-truncate')
85
+ a.classList.add('d-inline-block')
86
+ a.style.width = '460px'
87
+ a.textContent = post.title.toUpperCase()
84
88
  a.addEventListener('click', () => this.${prefix}Click(post.id))
85
89
  li.appendChild(a)
86
90
  el.appendChild(li)
@@ -88,7 +92,8 @@ async function controlNewsticker () {
88
92
  window.newsticker = new window.AcmeTicker(el, {
89
93
  type: 'vertical',
90
94
  direction: 'down',
91
- speed: 600
95
+ speed: 600,
96
+ autoplay: 4000000000
92
97
  })
93
98
  }
94
99
  `])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waibu-maps",
3
- "version": "2.7.0",
3
+ "version": "2.7.1",
4
4
  "description": "Maps for Waibu MPA",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/wiki/CHANGES.md CHANGED
@@ -3,6 +3,7 @@
3
3
  ## 2026-10-25
4
4
 
5
5
  - [2.7.0] Refactor getPosts()
6
+ - [2.7.1] Bug fix some positioning & dimensions
6
7
 
7
8
  ## 2026-10-21
8
9