huweili-cesium 1.2.50 → 1.2.51

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.
Files changed (2) hide show
  1. package/js/basis.js +5 -4
  2. package/package.json +1 -1
package/js/basis.js CHANGED
@@ -760,12 +760,13 @@ export function basicConfig() {
760
760
  zoomOutDefault(mapId, factor)
761
761
  }
762
762
 
763
- const defaultVisibleTitles = ['指北针', '2D/3D视角切换', '降低视角', '抬升视角', '更多']
763
+ const defaultVisibleTitles = ['指北针', '2D/3D视角切换', '降低视角', '抬升视角', '更多', '收起更多']
764
764
  let isMoreExpanded = false
765
765
 
766
766
  const isDefaultVisibleToolbarItem = (item) => {
767
- const title = item?.getAttribute?.('title') || item?.title || item?.textContent?.trim()
768
- return defaultVisibleTitles.includes(title)
767
+ const title = item?.getAttribute?.('title') || item?.title || ''
768
+ const text = item?.textContent?.trim() || ''
769
+ return defaultVisibleTitles.includes(title) || text.includes('更多')
769
770
  }
770
771
 
771
772
  const applyMoreVisible = (toolbar, expanded) => {
@@ -877,7 +878,7 @@ export function basicConfig() {
877
878
  {
878
879
  index: 1000,
879
880
  title: '更多',
880
- text: '更多',
881
+ text: '...',
881
882
  isDefaultVisible: true,
882
883
  isMoreToggle: true,
883
884
  onClick: (v, btn) => toggleMoreButtons(v, btn),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "huweili-cesium",
3
- "version": "1.2.50",
3
+ "version": "1.2.51",
4
4
  "description": "基于 Cesium 的地图工具库(无人机态势、轨迹、围栏、工具栏等)",
5
5
  "type": "module",
6
6
  "main": "./index.js",