diff --git a/package-lock.json b/package-lock.json index 38ce1696..a2217f42 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5370,6 +5370,16 @@ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dev": true, + "optional": true, + "requires": { + "file-uri-to-path": "1.0.0" + } + }, "bl": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.3.tgz", @@ -9432,6 +9442,13 @@ "integrity": "sha512-qyQ0pzAy78gVoJsmYeNgl8uH8yKhr1lVhW7JbzJmnlRi0I4R2eEDEJZVKG8agpDnLpacwNbDhLNG/LMdxHD2YQ==", "dev": true }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true, + "optional": true + }, "filename-reserved-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz", @@ -9859,9 +9876,9 @@ "dev": true }, "geojs": { - "version": "1.10.9", - "resolved": "https://registry.npmjs.org/geojs/-/geojs-1.10.9.tgz", - "integrity": "sha512-L2GlXco5om1rlHevneVu95SwQKhWjnLW2wMHmcALY4PVUJlC0KZww6Jqs6OF4gjSnYicsIJcyJW2u20SCbyPAA==", + "version": "1.10.11", + "resolved": "https://registry.npmjs.org/geojs/-/geojs-1.10.11.tgz", + "integrity": "sha512-Nze5FhAkhj4nLvPGIlcWdvuD94QccKzVLU/uw2CAJuHMCRke45LpNKsypgF4Tf9mi7OCcfYPgSlKRyFPPFceJg==", "dev": true, "requires": { "color-name": "^1.1.4", @@ -13864,9 +13881,9 @@ } }, "jquery": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz", - "integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.1.tgz", + "integrity": "sha512-opJeO4nCucVnsjiXOE+/PcCgYw9Gwpvs/a6B1LL/lQhwWwpbVEVYDZ1FokFr8PRc7ghYlrFPuyHuiiDNTQxmcw==", "dev": true }, "js-base64": { @@ -21211,9 +21228,9 @@ "dev": true }, "vtk.js": { - "version": "25.6.0", - "resolved": "https://registry.npmjs.org/vtk.js/-/vtk.js-25.6.0.tgz", - "integrity": "sha512-oPinvwVyQq0jlW9+yMWtJzvCWd/6IHWAqFew3yuJhAdwoZICDePQplldE8Gjx0i76UKFQy7mVPAtf2HN+BVbPw==", + "version": "25.8.6", + "resolved": "https://registry.npmjs.org/vtk.js/-/vtk.js-25.8.6.tgz", + "integrity": "sha512-GLJ7Gz1mV+n0AGCC+hlc4QfR2MvB91gJ1bi9o4sKfnnSKWALRPd9jWzbZGFdVW8nqA5oFNH2L4VdYFSy5luQnA==", "dev": true, "optional": true, "requires": { @@ -21782,6 +21799,7 @@ "dev": true, "optional": true, "requires": { + "bindings": "^1.5.0", "nan": "^2.12.1" } }, @@ -22103,6 +22121,7 @@ "dev": true, "optional": true, "requires": { + "bindings": "^1.5.0", "nan": "^2.12.1" } }, diff --git a/package.json b/package.json index 80bc2a95..39f280b3 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "eslint": "^6.7.2", "eslint-plugin-prettier": "^3.1.1", "eslint-plugin-vue": "^6.0.1", - "geojs": "^1.10.4", + "geojs": "^1.10.11", "node-sass": "^7.0.1", "prettier": "^1.19.1", "pug": "^3.0.1", diff --git a/src/components/ImageViewer.vue b/src/components/ImageViewer.vue index 36acd760..2d66092c 100644 --- a/src/components/ImageViewer.vue +++ b/src/components/ImageViewer.vue @@ -200,10 +200,9 @@ export default class ImageViewer extends Vue { } private get mapLayerList() { - if (this.store.layerMode !== "unroll") { - return [this.layerStackImages]; - } else { - const llist = [[]]; + let llist = [this.layerStackImages]; + if (this.store.layerMode === "unroll") { + llist = [[]]; let visible = 0; this.layerStackImages.forEach(lsi => { if (visible && lsi.layer.visible) { @@ -214,8 +213,8 @@ export default class ImageViewer extends Vue { visible += 1; } }); - return llist; } + return llist; } /** @@ -298,7 +297,7 @@ export default class ImageViewer extends Vue { map: map, imageLayers: [], params: params, - layerIndices: [] + baseLayerIndex: mllidx ? undefined : 0 }; if (this.maps.length <= mllidx) { this.maps.push(mapentry); @@ -380,9 +379,10 @@ export default class ImageViewer extends Vue { const mapentry = this.maps[mllidx]; const map = mapentry.map; // adjust number of tile layers - while (mapentry.imageLayers.length > mll.length * 2) { + while (mapentry.imageLayers.length > mll.length * 2 || (mapentry.baseLayerIndex !== baseLayerIndex && mapentry.imageLayers.length)) { map.deleteLayer(mapentry.imageLayers.pop()); } + mapentry.baseLayerIndex = baseLayerIndex; while (mapentry.imageLayers.length < mll.length * 2) { mapentry.params.layer.tilesAtZoom = (level: number) => { const s = Math.pow(2, someImage.levels - 1 - level); @@ -403,7 +403,7 @@ export default class ImageViewer extends Vue { * but we run out of webgl contexts sooner than that. Maybe because they * get switched on and off? */ - if (currentImageLayers + this.maps.length >= 10) { + if (currentImageLayers + this.maps.length >= 13) { mapentry.params.layer.renderer = "canvas"; } else { delete mapentry.params.layer.renderer;