gis-view-webgl2 0.1.5 → 0.1.6
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 +86 -1
- package/dist/index.js +1 -1
- package/docs/AI/345/257/271/350/257/235/346/261/207/346/200/273.md +64 -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 +55 -0
- package/docs/demos/MinimapDemo.vue +154 -1
- package/docs/demos/SearchFilterDemo.vue +113 -1
- package/docs/demos/api-index.js +16 -9
- package/docs/demos/demos.js +1 -1
- 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 +2 -2
- 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/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 +7 -3
- package/docs/manual/17-/345/217/202/346/225/260/351/200/237/346/237/245.md +10 -3
- package/docs/manual/18-/351/200/220/346/226/271/346/263/225/347/244/272/344/276/213.md +20 -1
- 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 +8 -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 +4 -4
- package/docs/steps/selftest-demos.html +105 -6
- package/docs/steps/selftest-docs.html +3 -3
- package/docs/steps/selftest-full.html +42 -1
- package/docs/steps/selftest-perf.html +600 -421
- package/package.json +1 -1
|
@@ -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, {
|