gis-view-webgl2 0.1.5 → 0.1.7
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.
- package/README.md +6 -3
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +172 -8
- package/dist/index.js +1 -1
- package/docs/AI/345/257/271/350/257/235/346/261/207/346/200/273.md +121 -0
- package/docs/GisView.md +1 -1
- package/docs/ai/06-/344/274/232/350/257/235/347/264/242/345/274/225/344/270/216/345/244/215/346/237/245/346/226/271/346/263/225.md +117 -0
- package/docs/demos/LabelDemo.vue +2 -2
- package/docs/demos/MinimapDemo.vue +154 -1
- package/docs/demos/SearchFilterDemo.vue +113 -1
- package/docs/demos/StyleDemo.vue +1 -1
- package/docs/demos/api-index.js +22 -14
- package/docs/demos/demos.js +1 -1
- package/docs/demos/gis-view-demo/useGisViewDemo.js +2 -2
- package/docs/internals/13-/351/271/260/347/234/274/345/233/276.md +2 -0
- package/docs/internals/16-01-/344/274/230/345/214/226/344/270/216/345/217/226/350/210/215-/344/270/212.md +13 -2
- package/docs/internals/16-03-/344/274/230/345/214/226/344/270/216/345/217/226/350/210/215-/344/270/213.md +11 -1
- package/docs/internals/18-/346/200/247/350/203/275/345/256/236/346/265/213/344/270/216WebGPU/350/257/204/344/274/260.md +61 -1
- package/docs/manual/03-/351/205/215/347/275/256/351/241/271.md +5 -4
- package/docs/manual/04-/344/272/213/344/273/266/344/270/216/345/233/236/350/260/203.md +38 -10
- package/docs/manual/05-/347/224/273/350/264/250/344/270/216/346/211/271/351/207/217/346/233/264/346/226/260.md +1 -1
- package/docs/manual/07-/346/214/207/351/222/210/344/270/216/350/246/201/347/264/240/347/274/226/350/276/221.md +7 -6
- package/docs/manual/08-/351/200/211/344/270/255/344/270/216/346/213/220/347/202/271.md +59 -3
- package/docs/manual/09-/351/200/232/351/201/223/344/270/216/345/244/232/345/233/236/347/272/277.md +14 -1
- package/docs/manual/14-/350/247/206/345/233/276/344/270/216/347/255/233/351/200/211.md +23 -5
- package/docs/manual/16-/345/256/236/344/276/213/346/226/271/346/263/225/346/200/273/350/241/250.md +12 -7
- package/docs/manual/17-/345/217/202/346/225/260/351/200/237/346/237/245.md +16 -8
- package/docs/manual/18-/351/200/220/346/226/271/346/263/225/347/244/272/344/276/213.md +27 -2
- package/docs/manual/19-/350/257/273/346/225/260/344/270/216/346/213/226/346/213/275/351/242/204/350/247/210.md +4 -0
- package/docs/manual/20-/346/200/247/350/203/275/344/270/216/345/244/247/346/225/260/346/215/256.md +9 -3
- package/docs/manual/21-/350/257/264/346/230/216/344/270/216/345/270/270/350/247/201/351/227/256/351/242/230.md +1 -1
- package/docs/steps/README.md +5 -5
- package/docs/steps/selftest-demos.html +105 -6
- package/docs/steps/selftest-docs.html +3 -3
- package/docs/steps/selftest-features.html +1 -1
- package/docs/steps/selftest-full.html +42 -1
- package/docs/steps/selftest-perf.html +600 -421
- package/docs/steps/selftest-select.html +168 -1
- package/package.json +1 -1
|
@@ -649,6 +649,36 @@
|
|
|
649
649
|
check('鹰眼图配置:范围跟相机开关打开后下发 extentFollowCamera=true', setup.minimapOptions().extentFollowCamera === true && view.getOptions().minimap.extentFollowCamera === true, String(setup.minimapOptions().extentFollowCamera))
|
|
650
650
|
extentFollowInput.click()
|
|
651
651
|
await wait(120)
|
|
652
|
+
const extentContentInput = document.querySelector('[data-demo=minimap-extent-content]')
|
|
653
|
+
check('鹰眼图配置:extentFollowContent 默认关闭,内容变化不会重算小图范围', Boolean(extentContentInput) && !extentContentInput.checked && setup.minimapOptions().extentFollowContent === false && view.getOptions().minimap.extentFollowContent === false, extentContentInput ? `checked ${extentContentInput.checked} / option ${setup.minimapOptions().extentFollowContent}` : '没有内容范围开关')
|
|
654
|
+
extentContentInput.click()
|
|
655
|
+
await wait(160)
|
|
656
|
+
check('鹰眼图配置:内容范围开关打开后下发 extentFollowContent=true', setup.minimapOptions().extentFollowContent === true && view.getOptions().minimap.extentFollowContent === true, String(setup.minimapOptions().extentFollowContent))
|
|
657
|
+
extentContentInput.click()
|
|
658
|
+
await wait(120)
|
|
659
|
+
const dragHandle = document.querySelector('[data-demo=minimap-drag-handle]')
|
|
660
|
+
const dragRoot = document.querySelector('.gis-view__minimap')
|
|
661
|
+
const dragRectBefore = dragRoot?.getBoundingClientRect()
|
|
662
|
+
if (dragHandle && dragRoot && dragRectBefore) {
|
|
663
|
+
const pointer = { bubbles: true, cancelable: true, composed: true, pointerId: 23, pointerType: 'mouse', isPrimary: true, button: 0 }
|
|
664
|
+
const startX = dragRectBefore.left + dragRectBefore.width / 2
|
|
665
|
+
const startY = dragRectBefore.top + 8
|
|
666
|
+
dragHandle.dispatchEvent(new PointerEvent('pointerdown', { ...pointer, clientX: startX, clientY: startY }))
|
|
667
|
+
dragHandle.dispatchEvent(new PointerEvent('pointermove', { ...pointer, clientX: startX + 18, clientY: startY + 12 }))
|
|
668
|
+
dragHandle.dispatchEvent(new PointerEvent('pointerup', { ...pointer, clientX: startX + 18, clientY: startY + 12 }))
|
|
669
|
+
await wait(160)
|
|
670
|
+
const dragOffset = view.getOptions().minimap.offset
|
|
671
|
+
const dragRectAfter = dragRoot.getBoundingClientRect()
|
|
672
|
+
const moved = Math.abs((dragRectAfter.left - dragRectBefore.left) - 18) < 1 && Math.abs((dragRectAfter.top - dragRectBefore.top) - 12) < 1
|
|
673
|
+
check('鹰眼图配置:顶部手柄能整体拖动鹰眼图,offset 与容器位置同步', dragOffset?.[0] === 18 && dragOffset?.[1] === 12 && moved && text('minimap-offset-readout').includes('18, 12'), `offset=${JSON.stringify(dragOffset)} / ${dragRectBefore.left},${dragRectBefore.top} -> ${dragRectAfter.left},${dragRectAfter.top}`)
|
|
674
|
+
document.querySelector('[data-demo=minimap-offset-reset]').click()
|
|
675
|
+
await wait(120)
|
|
676
|
+
const resetOffset = view.getOptions().minimap.offset
|
|
677
|
+
check('鹰眼图配置:整图位置复位回到 offset [0, 0]', resetOffset?.[0] === 0 && resetOffset?.[1] === 0 && text('minimap-offset-readout').includes('0, 0'), `${JSON.stringify(resetOffset)} / ${text('minimap-offset-readout')}`)
|
|
678
|
+
}
|
|
679
|
+
else {
|
|
680
|
+
check('鹰眼图配置:能找到整图拖动手柄', false, dragHandle ? '小图根节点尺寸为 0' : '没有整图拖动手柄')
|
|
681
|
+
}
|
|
652
682
|
const pointSizeScaleInput = document.querySelector('[data-demo=minimap-point-size-scale]')
|
|
653
683
|
const lineWidthScaleInput = document.querySelector('[data-demo=minimap-line-width-scale]')
|
|
654
684
|
check(
|
|
@@ -804,6 +834,71 @@
|
|
|
804
834
|
view.focusOn(groupHit)
|
|
805
835
|
view.selectFeatures(groupHit)
|
|
806
836
|
check('搜索与筛选:scope=groups 返回通道分组,并可直接聚焦 / 选中分组命中', Boolean(groupReady) && readout('search-filter-summary').includes('节点 0') && readout('search-filter-summary').includes('通道 0') && groupHit?.kind === 'group' && view.getSelections().length > 0, `${readout('search-filter-summary')} / ${JSON.stringify(groupHit)}`)
|
|
837
|
+
// 相机飞行:duration 0 立即落位;普通时长能读进度并随时停;程序化改相机会自动让路
|
|
838
|
+
view.flyTo({ minX: 0, minY: 0, maxX: 10, maxY: 10 }, { duration: 0 })
|
|
839
|
+
const landed = view.getCamera()
|
|
840
|
+
check('相机飞行:duration=0 立即落位,中心与目标一致且没有残留动画',
|
|
841
|
+
Math.abs(landed.center[0] - 5) < 1e-6 && Math.abs(landed.center[1] - 5) < 1e-6 && view.cameraAnimating === false && view.getCameraAnimation() === null,
|
|
842
|
+
JSON.stringify(landed))
|
|
843
|
+
view.flyTo({ minX: 1000, minY: 1000, maxX: 1010, maxY: 1010 }, { duration: 600 })
|
|
844
|
+
const flight = view.getCameraAnimation()
|
|
845
|
+
check('相机飞行:进行中 cameraAnimating / getCameraAnimation / 终点读数都对得上',
|
|
846
|
+
view.cameraAnimating === true && flight?.active === true && flight.duration === 600 && Math.abs(flight.to.center[0] - 1005) < 1e-6 && Math.abs(flight.to.center[1] - 1005) < 1e-6,
|
|
847
|
+
JSON.stringify(flight))
|
|
848
|
+
const stopReturned = view.stopCameraAnimation()
|
|
849
|
+
check('相机飞行:stopCameraAnimation 链式返回实例、立即结束动画',
|
|
850
|
+
stopReturned === view && view.cameraAnimating === false && view.getCameraAnimation() === null)
|
|
851
|
+
view.flyTo({ minX: 1000, minY: 1000, maxX: 1010, maxY: 1010 }, { duration: 600 })
|
|
852
|
+
view.setCamera({ center: [12, 34] })
|
|
853
|
+
const overridden = view.getCamera()
|
|
854
|
+
check('相机飞行:程序化 setCamera 会取消飞行,最终相机以调用方为准',
|
|
855
|
+
view.cameraAnimating === false && overridden.center[0] === 12 && overridden.center[1] === 34,
|
|
856
|
+
JSON.stringify(overridden))
|
|
857
|
+
click('search-filter-fly-all')
|
|
858
|
+
await wait(60)
|
|
859
|
+
const demoFlying = readout('search-filter-camera').includes('true') && view.cameraAnimating && readout('search-filter-action').includes('flyTo')
|
|
860
|
+
click('search-filter-stop-flight')
|
|
861
|
+
await wait(60)
|
|
862
|
+
const demoStopped = readout('search-filter-camera').includes('false') && !view.cameraAnimating && readout('search-filter-action').includes('stopCameraAnimation')
|
|
863
|
+
check('相机飞行 demo:按钮能启动并停止飞行,读数同步 cameraAnimating', demoFlying && demoStopped, `${readout('search-filter-camera')} / ${readout('search-filter-action')}`)
|
|
864
|
+
// flyToCamera:只给 center 时比例沿用当前相机;只给 scale 时中心沿用当前相机
|
|
865
|
+
const cameraApiScale = view.getCamera().scale
|
|
866
|
+
const flyCameraReturned = view.flyToCamera({ center: [20, 30] }, { duration: 0 })
|
|
867
|
+
const centerOnly = view.getCamera()
|
|
868
|
+
view.flyToCamera({ scale: 5 }, { duration: 0 })
|
|
869
|
+
const scaleOnly = view.getCamera()
|
|
870
|
+
check('flyToCamera:未写的相机字段沿用当前值,duration=0 立即落位并链式返回实例',
|
|
871
|
+
flyCameraReturned === view && Math.abs(centerOnly.center[0] - 20) < 1e-6 && Math.abs(centerOnly.center[1] - 30) < 1e-6 && Math.abs(centerOnly.scale - cameraApiScale) < 1e-6 &&
|
|
872
|
+
Math.abs(scaleOnly.center[0] - 20) < 1e-6 && Math.abs(scaleOnly.center[1] - 30) < 1e-6 && Math.abs(scaleOnly.scale - 5) < 1e-6,
|
|
873
|
+
`center-only ${JSON.stringify(centerOnly)} / scale-only ${JSON.stringify(scaleOnly)}`)
|
|
874
|
+
click('search-filter-fly-camera')
|
|
875
|
+
await wait(80)
|
|
876
|
+
const cameraPresetFlying = view.cameraAnimating && readout('search-filter-action').includes('flyToCamera')
|
|
877
|
+
view.stopCameraAnimation()
|
|
878
|
+
check('flyToCamera demo:按钮直接飞相机目标,不经过要素解析', cameraPresetFlying, `${readout('search-filter-camera')} / ${readout('search-filter-action')}`)
|
|
879
|
+
// 线路窄样式:换色 / 加宽后 getLineStyle 立刻是新值,dataVersion 不动
|
|
880
|
+
const styleVersionBefore = view.dataVersion
|
|
881
|
+
const styleBefore = view.getLineStyle(0)
|
|
882
|
+
click('search-filter-line-recolor')
|
|
883
|
+
await wait(100)
|
|
884
|
+
const styleAfter = view.getLineStyle(0)
|
|
885
|
+
check('getLineStyle:线路换色 / 加宽后读到最新解析值,dataVersion 不变',
|
|
886
|
+
styleBefore !== null && styleAfter !== null && Math.abs(styleAfter.width - 3.2) < 1e-6 && Math.abs(styleAfter.opacity - 1) < 1e-6 &&
|
|
887
|
+
styleAfter.color.some((value, index) => Math.abs(value - styleBefore.color[index]) > 1e-3) &&
|
|
888
|
+
styleVersionBefore === view.dataVersion && readout('search-filter-line-style').includes('width=3.20'),
|
|
889
|
+
`${JSON.stringify(styleBefore)} -> ${JSON.stringify(styleAfter)} · dataVersion ${styleVersionBefore} -> ${view.dataVersion}`)
|
|
890
|
+
click('search-filter-line-recolor')
|
|
891
|
+
await wait(80)
|
|
892
|
+
// 数据修订号:改点后递增,onDataChange 载荷与只读属性是同一个数
|
|
893
|
+
const dataVersionBefore = view.dataVersion
|
|
894
|
+
click('search-filter-data-bump')
|
|
895
|
+
const dataVersionText = await until(() => {
|
|
896
|
+
const text = readout('search-filter-data-version')
|
|
897
|
+
return view.dataVersion > dataVersionBefore && text.includes(`dataVersion=${view.dataVersion}`) && text.includes(`onDataChange=${view.dataVersion}`) ? text : ''
|
|
898
|
+
}, 3000) ?? ''
|
|
899
|
+
check('dataVersion:改一个点后递增,onDataChange 载荷与只读属性同步',
|
|
900
|
+
Boolean(dataVersionText) && view.dataVersion > dataVersionBefore,
|
|
901
|
+
`${dataVersionBefore} -> ${view.dataVersion} / ${dataVersionText}`)
|
|
807
902
|
click('search-filter-preset-symbol')
|
|
808
903
|
const symbolReady = await until(() => readout('search-filter-summary').includes('节点 8'), 4000)
|
|
809
904
|
check('搜索与筛选:显式 fields=[symbol] 能搜默认跳过的符号字段', Boolean(symbolReady) && readout('search-filter-hit-0').includes('symbol = square'), `${readout('search-filter-summary')} / ${readout('search-filter-hit-0')}`)
|
|
@@ -2398,18 +2493,22 @@
|
|
|
2398
2493
|
await wait(150)
|
|
2399
2494
|
const apiItems = () => [...document.querySelectorAll('.demo-api-list:not(.demo-api-list--options) .demo-api-item')]
|
|
2400
2495
|
const optionItems = () => [...document.querySelectorAll('.demo-api-list--options .demo-api-item')]
|
|
2401
|
-
check('实例方法速查:整份成员清单按分组列全(16 组 /
|
|
2402
|
-
Boolean(ready) && document.querySelectorAll('.demo-api-group').length === 16 && apiItems().length ===
|
|
2496
|
+
check('实例方法速查:整份成员清单按分组列全(16 组 / 265 个成员)',
|
|
2497
|
+
Boolean(ready) && document.querySelectorAll('.demo-api-group').length === 16 && apiItems().length === 265,
|
|
2403
2498
|
`${document.querySelectorAll('.demo-api-group').length} 组 / ${apiItems().length} 个成员`)
|
|
2404
2499
|
const apiNames = apiItems().map(node => node.querySelector('b')?.textContent)
|
|
2405
2500
|
const roundNames = ['registerSymbol', 'unregisterSymbol', 'listSymbols']
|
|
2406
2501
|
check('实例方法速查:本轮新增的三个方法都在清单里(registerSymbol / unregisterSymbol / listSymbols)',
|
|
2407
2502
|
roundNames.every(name => apiNames.includes(name)),
|
|
2408
2503
|
roundNames.filter(name => !apiNames.includes(name)).join(' / ') || '三个都在')
|
|
2409
|
-
const roundNamesAuto = ['getZoomBaseScale', 'setZoomBaseScale']
|
|
2410
|
-
check('实例方法速查:自适应比例的读 / 写两个方法在清单里(getZoomBaseScale / setZoomBaseScale)',
|
|
2411
|
-
roundNamesAuto.every(name => apiNames.includes(name)),
|
|
2412
|
-
roundNamesAuto.filter(name => !apiNames.includes(name)).join(' / ') || '两个都在')
|
|
2504
|
+
const roundNamesAuto = ['getZoomBaseScale', 'setZoomBaseScale']
|
|
2505
|
+
check('实例方法速查:自适应比例的读 / 写两个方法在清单里(getZoomBaseScale / setZoomBaseScale)',
|
|
2506
|
+
roundNamesAuto.every(name => apiNames.includes(name)),
|
|
2507
|
+
roundNamesAuto.filter(name => !apiNames.includes(name)).join(' / ') || '两个都在')
|
|
2508
|
+
const roundNamesCameraApi = ['flyToCamera', 'getLineStyle', 'dataVersion']
|
|
2509
|
+
check('实例方法速查:相机目标、线路样式快照与数据版本三个成员在清单里',
|
|
2510
|
+
roundNamesCameraApi.every(name => apiNames.includes(name)),
|
|
2511
|
+
roundNamesCameraApi.filter(name => !apiNames.includes(name)).join(' / ') || '三个都在')
|
|
2413
2512
|
const roundNames1597 = ['addChannelGroupLines', 'joinChannelGroupLines', 'endAddChannel']
|
|
2414
2513
|
check('实例方法速查:这一轮拆出来的方法也在清单里(addChannelGroupLines / joinChannelGroupLines / endAddChannel)',
|
|
2415
2514
|
roundNames1597.every(name => apiNames.includes(name)),
|
|
@@ -520,8 +520,8 @@
|
|
|
520
520
|
if (check('API 速查:挂上了 __gisApi 钩子(数据来自 api-index.js,没钩子多半是 file:// 打开的)', Boolean(apiHook))) {
|
|
521
521
|
const apiDoc = apiFrame.contentDocument
|
|
522
522
|
const summary = apiHook.summary
|
|
523
|
-
check('API 速查:清单来自 api-index(
|
|
524
|
-
summary.members ===
|
|
523
|
+
check('API 速查:清单来自 api-index(265 个成员 / 260 个方法 / 5 个属性 / 96 个 options / 16 个分组)',
|
|
524
|
+
summary.members === 265 && summary.methods === 260 && summary.properties === 5 && summary.options === 96 && summary.sections === 16,
|
|
525
525
|
JSON.stringify(summary))
|
|
526
526
|
const topJumps = [...apiDoc.querySelectorAll('.doc-jump')]
|
|
527
527
|
const jumpTargets = topJumps.map(node => `${node.dataset.docJump}:${node.getAttribute('href')}`)
|
|
@@ -559,7 +559,7 @@
|
|
|
559
559
|
`${apiDoc.querySelectorAll('.api-member').length} 张卡片 / 属性 ${apiDoc.querySelectorAll('.api-member[data-kind="property"]').length} 张`)
|
|
560
560
|
const noExample = [...apiDoc.querySelectorAll('.api-member')].filter(node => Number(node.dataset.examples) < 1)
|
|
561
561
|
check('API 速查:每个成员都带至少一段示例(不出现空卡片)', noExample.length === 0,
|
|
562
|
-
noExample.length ? noExample.map(node => node.dataset.name).join(' / ') : '
|
|
562
|
+
noExample.length ? noExample.map(node => node.dataset.name).join(' / ') : '265 张卡片都有示例')
|
|
563
563
|
check('API 速查:96 个 options 都列全(名字 / 类型 / 默认值 / 说明四件套)',
|
|
564
564
|
apiDoc.querySelectorAll('.api-option').length === summary.options && [...apiDoc.querySelectorAll('.api-option')].every(node => node.querySelector('.name code') && node.querySelector('.type') && node.querySelector('.def') && node.querySelector('.doc')),
|
|
565
565
|
`${apiDoc.querySelectorAll('.api-option').length} 个`)
|
|
@@ -3880,7 +3880,7 @@
|
|
|
3880
3880
|
rdHost.remove()
|
|
3881
3881
|
}
|
|
3882
3882
|
{
|
|
3883
|
-
// 接口选中(
|
|
3883
|
+
// 接口选中(selectFeatures)、读回选中(getSelectionData)与聚焦(focusOn:单个 / 一批 / 只居中)
|
|
3884
3884
|
const apiHost = document.createElement('div')
|
|
3885
3885
|
apiHost.style.cssText = 'width:520px;height:340px'
|
|
3886
3886
|
document.body.appendChild(apiHost)
|
|
@@ -223,8 +223,49 @@
|
|
|
223
223
|
check('鹰眼图 extent: 打开 extentFollowCamera 后,相机落进小范围时 auto 以它为准',
|
|
224
224
|
tinyView.getOptions().minimap.extentFollowCamera === true && fillFocused > 200 && fillFocused > fillSquashed + 200,
|
|
225
225
|
`squashed=${fillSquashed} focused=${fillFocused}`)
|
|
226
|
+
// extentFollowContent 默认关闭:筛选掉外围节点后,鹰眼图仍用首次铺好的范围;显式打开后才跟着当前可见内容缩。
|
|
227
|
+
const lockHost = document.createElement('div')
|
|
228
|
+
lockHost.style.cssText = 'position:fixed;left:-9999px;top:0;width:420px;height:320px'
|
|
229
|
+
document.body.appendChild(lockHost)
|
|
230
|
+
const lockExtents = []
|
|
231
|
+
const lockView = createGisView(lockHost, {
|
|
232
|
+
points: [
|
|
233
|
+
{ id: 'near-a', x: 0, y: 0, zone: 'near' },
|
|
234
|
+
{ id: 'near-b', x: 10, y: 0, zone: 'near' },
|
|
235
|
+
{ id: 'far', x: 100, y: 40, zone: 'far' }
|
|
236
|
+
],
|
|
237
|
+
lines: [],
|
|
238
|
+
background: false,
|
|
239
|
+
minimap: {
|
|
240
|
+
width: 200,
|
|
241
|
+
height: 160,
|
|
242
|
+
background: false,
|
|
243
|
+
extent: 'auto',
|
|
244
|
+
extentFollowContent: false,
|
|
245
|
+
draw: info => lockExtents.push({ ...info.extent })
|
|
246
|
+
}
|
|
247
|
+
})
|
|
248
|
+
await settleFrames()
|
|
249
|
+
const lockBefore = lockExtents.at(-1)
|
|
250
|
+
lockView.setFilter({ points: { zone: 'near' }, worker: false })
|
|
251
|
+
await settleFrames()
|
|
252
|
+
const lockAfter = lockExtents.at(-1)
|
|
253
|
+
const sameExtent = lockBefore && lockAfter &&
|
|
254
|
+
Math.abs(lockBefore.minX - lockAfter.minX) < 1e-6 && Math.abs(lockBefore.minY - lockAfter.minY) < 1e-6 &&
|
|
255
|
+
Math.abs(lockBefore.maxX - lockAfter.maxX) < 1e-6 && Math.abs(lockBefore.maxY - lockAfter.maxY) < 1e-6
|
|
256
|
+
check('鹰眼图 extentFollowContent 默认关闭:外围节点被筛掉后包围盒保持不变',
|
|
257
|
+
lockView.getOptions().minimap.extentFollowContent === false && lockBefore?.maxX === 100 && lockBefore?.maxY === 40 && sameExtent,
|
|
258
|
+
`before=${JSON.stringify(lockBefore)} after=${JSON.stringify(lockAfter)}`)
|
|
259
|
+
lockView.updateOptions({ minimap: { ...lockView.getOptions().minimap, extentFollowContent: true } })
|
|
260
|
+
await settleFrames()
|
|
261
|
+
const lockFollowed = lockExtents.at(-1)
|
|
262
|
+
check('鹰眼图 extentFollowContent 打开后:包围盒按当前可见内容重算',
|
|
263
|
+
lockView.getOptions().minimap.extentFollowContent === true && lockFollowed?.maxX === 10 && lockFollowed?.maxY === 0,
|
|
264
|
+
JSON.stringify(lockFollowed))
|
|
265
|
+
lockView.destroy()
|
|
266
|
+
lockHost.remove()
|
|
226
267
|
// 这一轮:沿用主图规则取描边色(不再是白点)、继承尺寸不受主视图地图倍数影响、框与框选矩形的样式
|
|
227
|
-
const ruleHost = document.createElement('div')
|
|
268
|
+
const ruleHost = document.createElement('div')
|
|
228
269
|
ruleHost.style.cssText = 'position:fixed;left:-9999px;top:0;width:420px;height:320px'
|
|
229
270
|
document.body.appendChild(ruleHost)
|
|
230
271
|
const ruleView = createGisView(ruleHost, {
|