ui_migration uppgrade(openseadragon) Fixings for lifecycle for v6

This commit is contained in:
Antonio Anaya 2026-05-25 18:08:43 -06:00
parent 710883cff5
commit 3cbf3a1758
3 changed files with 98 additions and 113 deletions

166
webapp/package-lock.json generated
View file

@ -11,10 +11,10 @@
"dependencies": { "dependencies": {
"@vueuse/core": "^14.3.0", "@vueuse/core": "^14.3.0",
"axios": "^1.16.1", "axios": "^1.16.1",
"material-symbols": "^0.44.8", "material-symbols": "^0.44.9",
"mitt": "^3.0.1", "mitt": "^3.0.1",
"mousetrap": "^1.6.5", "mousetrap": "^1.6.5",
"openseadragon": "^5.0.0", "openseadragon": "^6.0.2",
"pinia": "^3.0.4", "pinia": "^3.0.4",
"pinia-plugin-persistedstate": "^4.7.1", "pinia-plugin-persistedstate": "^4.7.1",
"uikit": "^3.25.16", "uikit": "^3.25.16",
@ -44,8 +44,8 @@
"stylelint": "^17.12.0", "stylelint": "^17.12.0",
"stylelint-config-standard": "^40.0.0", "stylelint-config-standard": "^40.0.0",
"stylelint-config-standard-less": "^4.1.0", "stylelint-config-standard-less": "^4.1.0",
"typescript-eslint": "^8.59.4", "typescript-eslint": "^8.60.0",
"vite": "^8.0.13", "vite": "^8.0.14",
"vitest": "^4.1.7" "vitest": "^4.1.7"
}, },
"engines": { "engines": {
@ -825,9 +825,6 @@
"arm64" "arm64"
], ],
"dev": true, "dev": true,
"libc": [
"glibc"
],
"license": "MIT", "license": "MIT",
"optional": true, "optional": true,
"os": [ "os": [
@ -845,9 +842,6 @@
"arm64" "arm64"
], ],
"dev": true, "dev": true,
"libc": [
"musl"
],
"license": "MIT", "license": "MIT",
"optional": true, "optional": true,
"os": [ "os": [
@ -865,9 +859,6 @@
"ppc64" "ppc64"
], ],
"dev": true, "dev": true,
"libc": [
"glibc"
],
"license": "MIT", "license": "MIT",
"optional": true, "optional": true,
"os": [ "os": [
@ -885,9 +876,6 @@
"s390x" "s390x"
], ],
"dev": true, "dev": true,
"libc": [
"glibc"
],
"license": "MIT", "license": "MIT",
"optional": true, "optional": true,
"os": [ "os": [
@ -905,9 +893,6 @@
"x64" "x64"
], ],
"dev": true, "dev": true,
"libc": [
"glibc"
],
"license": "MIT", "license": "MIT",
"optional": true, "optional": true,
"os": [ "os": [
@ -925,9 +910,6 @@
"x64" "x64"
], ],
"dev": true, "dev": true,
"libc": [
"musl"
],
"license": "MIT", "license": "MIT",
"optional": true, "optional": true,
"os": [ "os": [
@ -1125,17 +1107,17 @@
} }
}, },
"node_modules/@typescript-eslint/eslint-plugin": { "node_modules/@typescript-eslint/eslint-plugin": {
"version": "8.59.4", "version": "8.60.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.59.4.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.60.0.tgz",
"integrity": "sha512-PegsU+XfyJJNjd4+u/k6f9yTyp0lEXXiPopUNobZcIAUJFGICFLN+sP0Rb3JehVmiij1Ph0dFGYqODoRo/2+6A==", "integrity": "sha512-QYb/sa74/s7OKMbACMjrYnGspj9Hs5YI5aaffSL65UfeBUzVzBJfVo3oWSpbzPurvm7yaCCo2Lk7lVj610HqKw==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@eslint-community/regexpp": "^4.12.2", "@eslint-community/regexpp": "^4.12.2",
"@typescript-eslint/scope-manager": "8.59.4", "@typescript-eslint/scope-manager": "8.60.0",
"@typescript-eslint/type-utils": "8.59.4", "@typescript-eslint/type-utils": "8.60.0",
"@typescript-eslint/utils": "8.59.4", "@typescript-eslint/utils": "8.60.0",
"@typescript-eslint/visitor-keys": "8.59.4", "@typescript-eslint/visitor-keys": "8.60.0",
"ignore": "^7.0.5", "ignore": "^7.0.5",
"natural-compare": "^1.4.0", "natural-compare": "^1.4.0",
"ts-api-utils": "^2.5.0" "ts-api-utils": "^2.5.0"
@ -1148,7 +1130,7 @@
"url": "https://opencollective.com/typescript-eslint" "url": "https://opencollective.com/typescript-eslint"
}, },
"peerDependencies": { "peerDependencies": {
"@typescript-eslint/parser": "^8.59.4", "@typescript-eslint/parser": "^8.60.0",
"eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
"typescript": ">=4.8.4 <6.1.0" "typescript": ">=4.8.4 <6.1.0"
} }
@ -1164,16 +1146,16 @@
} }
}, },
"node_modules/@typescript-eslint/parser": { "node_modules/@typescript-eslint/parser": {
"version": "8.59.4", "version": "8.60.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.59.4.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.60.0.tgz",
"integrity": "sha512-zORHqO/tuhxY1zWuTvMUqddRxpiFJ72xVfcNoWpqdLjs6lfPbuQBJuW4pk+49/uBMy7Ssr4bzgjiKmmDB1UbZQ==", "integrity": "sha512-fcqpj/MyK4sxDPcbe7STNPbpQL4RLZOPWuaTmwZYuc+hJKzRf58yRxfhqGpc6PIq9ZyfSBpfHgmUHmHs0KwHwg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@typescript-eslint/scope-manager": "8.59.4", "@typescript-eslint/scope-manager": "8.60.0",
"@typescript-eslint/types": "8.59.4", "@typescript-eslint/types": "8.60.0",
"@typescript-eslint/typescript-estree": "8.59.4", "@typescript-eslint/typescript-estree": "8.60.0",
"@typescript-eslint/visitor-keys": "8.59.4", "@typescript-eslint/visitor-keys": "8.60.0",
"debug": "^4.4.3" "debug": "^4.4.3"
}, },
"engines": { "engines": {
@ -1189,14 +1171,14 @@
} }
}, },
"node_modules/@typescript-eslint/project-service": { "node_modules/@typescript-eslint/project-service": {
"version": "8.59.4", "version": "8.60.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.59.4.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.60.0.tgz",
"integrity": "sha512-Ly00Vu4oAacfDeHp2Zg85ioNG6l8HG+tN1D7J+xTHSxu9y0awYKJ2zH1rFBn8ZSfuGK+7FxK3Cgl3uAz0aZZLg==", "integrity": "sha512-aZu74NNKJeUWqCjDddzdiKaS82dgYgV/vmf+Ui3ZdZejmgfXR/q+pRumgobnQ2cCJTgGTWp4ypiwsuofFubavg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@typescript-eslint/tsconfig-utils": "^8.59.4", "@typescript-eslint/tsconfig-utils": "^8.60.0",
"@typescript-eslint/types": "^8.59.4", "@typescript-eslint/types": "^8.60.0",
"debug": "^4.4.3" "debug": "^4.4.3"
}, },
"engines": { "engines": {
@ -1211,14 +1193,14 @@
} }
}, },
"node_modules/@typescript-eslint/scope-manager": { "node_modules/@typescript-eslint/scope-manager": {
"version": "8.59.4", "version": "8.60.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.59.4.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.60.0.tgz",
"integrity": "sha512-mUeR/3H1WrTAddJrwut8OoPjfauaztMQmRwV5fQTUyNVJCLiUXXe4lGEyYIL2oFDpP7UtgbGJXCt72wT0z2S3Q==", "integrity": "sha512-pFzqhllJMs+jghLQWzV00ds39xLzuyqPSev5pd8f4Ir0rtKR3ZLUB4/4dhjOFighWb9larvtfJvqL+4yKDI3Xw==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@typescript-eslint/types": "8.59.4", "@typescript-eslint/types": "8.60.0",
"@typescript-eslint/visitor-keys": "8.59.4" "@typescript-eslint/visitor-keys": "8.60.0"
}, },
"engines": { "engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0" "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@ -1229,9 +1211,9 @@
} }
}, },
"node_modules/@typescript-eslint/tsconfig-utils": { "node_modules/@typescript-eslint/tsconfig-utils": {
"version": "8.59.4", "version": "8.60.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.59.4.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.60.0.tgz",
"integrity": "sha512-DLCpnKgD4alVxTBSKulK+gU1KCqOgUXfDRDXh2mZgzokQKa/70ax93I2uVO3m/LLvIAtWZIFoiifudmIqAxpMA==", "integrity": "sha512-BZPR3RGYlAXnly6ymAxfkVn5rCbZzQNou0rxv3GfWZ8cTQp+hhVd73khbGLAd8k1TlAPLISH337M+tAgAnaJDQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
@ -1246,15 +1228,15 @@
} }
}, },
"node_modules/@typescript-eslint/type-utils": { "node_modules/@typescript-eslint/type-utils": {
"version": "8.59.4", "version": "8.60.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.59.4.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.60.0.tgz",
"integrity": "sha512-uonTuPAAKr9XaBGqJ3LjYTh72zy5DyGesljO9gtmk/eFW0W1fRHjnwVYKB35Lm8d5Q5CluEW3gPHjTvZTmgrfA==", "integrity": "sha512-SX46wEUtitCpq7AN38HkUU/+zvUpdKf7ephtWAFgckH8O7PQIyL5gvrhQgBLuEYgLfuKWOVvWVskMbuFHAz5xg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@typescript-eslint/types": "8.59.4", "@typescript-eslint/types": "8.60.0",
"@typescript-eslint/typescript-estree": "8.59.4", "@typescript-eslint/typescript-estree": "8.60.0",
"@typescript-eslint/utils": "8.59.4", "@typescript-eslint/utils": "8.60.0",
"debug": "^4.4.3", "debug": "^4.4.3",
"ts-api-utils": "^2.5.0" "ts-api-utils": "^2.5.0"
}, },
@ -1271,9 +1253,9 @@
} }
}, },
"node_modules/@typescript-eslint/types": { "node_modules/@typescript-eslint/types": {
"version": "8.59.4", "version": "8.60.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.59.4.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.60.0.tgz",
"integrity": "sha512-F1o7WJcCq+bc8dwcO/YsSEOudAH8RDtaOhM6wcAQhcUsFhnWQl81JKy48q1hoxAU0qrzM89+31GYh1515Zde3Q==", "integrity": "sha512-AsE7x2XaAK+CVbeih0Fvbn+r1qHxtpLDJ3XUuFcIinT318T90yHMJC+Zgv+jUuDjQQd06HKwxnDu6sz1IcTilA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
@ -1285,16 +1267,16 @@
} }
}, },
"node_modules/@typescript-eslint/typescript-estree": { "node_modules/@typescript-eslint/typescript-estree": {
"version": "8.59.4", "version": "8.60.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.59.4.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.60.0.tgz",
"integrity": "sha512-F+RuOmcDXo4+TPdfd/TCLS3m2nw8gE9XXyZLrA3JBfaA5tz9TtdkyD3YJFmPxulyc2cKbEok/CvFE3MgSLWnag==", "integrity": "sha512-3AcZNBGMClm6CXDyo8kYvVGT/sx29sS0oBsIb9oZI2gunA4Vm2M3YHzRLPvsUBBsl+yB5FPtltq7gGH0iTlp9g==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@typescript-eslint/project-service": "8.59.4", "@typescript-eslint/project-service": "8.60.0",
"@typescript-eslint/tsconfig-utils": "8.59.4", "@typescript-eslint/tsconfig-utils": "8.60.0",
"@typescript-eslint/types": "8.59.4", "@typescript-eslint/types": "8.60.0",
"@typescript-eslint/visitor-keys": "8.59.4", "@typescript-eslint/visitor-keys": "8.60.0",
"debug": "^4.4.3", "debug": "^4.4.3",
"minimatch": "^10.2.2", "minimatch": "^10.2.2",
"semver": "^7.7.3", "semver": "^7.7.3",
@ -1313,16 +1295,16 @@
} }
}, },
"node_modules/@typescript-eslint/utils": { "node_modules/@typescript-eslint/utils": {
"version": "8.59.4", "version": "8.60.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.59.4.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.60.0.tgz",
"integrity": "sha512-cYXeNAUsG4lJo5dbc1FcKm+JwIWrj1/UpTORsC6tGMjEZ81DYcvIr9/ueikhMa/Y/gDQYGp+YX9/xQrXje5BJw==", "integrity": "sha512-HtXuPfrHTyBDkameWpl+vJb1Uevu2tznAyahM1Oc4AENidCLTPiZDWIo4GfcxNdC/RcfGcadzzkqbRG87dUrQA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@eslint-community/eslint-utils": "^4.9.1", "@eslint-community/eslint-utils": "^4.9.1",
"@typescript-eslint/scope-manager": "8.59.4", "@typescript-eslint/scope-manager": "8.60.0",
"@typescript-eslint/types": "8.59.4", "@typescript-eslint/types": "8.60.0",
"@typescript-eslint/typescript-estree": "8.59.4" "@typescript-eslint/typescript-estree": "8.60.0"
}, },
"engines": { "engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0" "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@ -1337,13 +1319,13 @@
} }
}, },
"node_modules/@typescript-eslint/visitor-keys": { "node_modules/@typescript-eslint/visitor-keys": {
"version": "8.59.4", "version": "8.60.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.59.4.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.60.0.tgz",
"integrity": "sha512-U3gxVaDVnuZKhSspW/MzMxE1kq7zOdc072FcSNoqA1I9p8HyKbBFfEHoWckBAMgNMph4MamwS5iTVzFmrnt8TQ==", "integrity": "sha512-9WI52t8ZGLVGrPMBet25yAftqY/n95+zmoUUtJBBQTKDSKUu7OsPTroT2op7U9JatkoRccL0YkWDNMFfC4Sjxg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@typescript-eslint/types": "8.59.4", "@typescript-eslint/types": "8.60.0",
"eslint-visitor-keys": "^5.0.0" "eslint-visitor-keys": "^5.0.0"
}, },
"engines": { "engines": {
@ -4028,9 +4010,6 @@
"arm64" "arm64"
], ],
"dev": true, "dev": true,
"libc": [
"glibc"
],
"license": "MPL-2.0", "license": "MPL-2.0",
"optional": true, "optional": true,
"os": [ "os": [
@ -4052,9 +4031,6 @@
"arm64" "arm64"
], ],
"dev": true, "dev": true,
"libc": [
"musl"
],
"license": "MPL-2.0", "license": "MPL-2.0",
"optional": true, "optional": true,
"os": [ "os": [
@ -4076,9 +4052,6 @@
"x64" "x64"
], ],
"dev": true, "dev": true,
"libc": [
"glibc"
],
"license": "MPL-2.0", "license": "MPL-2.0",
"optional": true, "optional": true,
"os": [ "os": [
@ -4100,9 +4073,6 @@
"x64" "x64"
], ],
"dev": true, "dev": true,
"libc": [
"musl"
],
"license": "MPL-2.0", "license": "MPL-2.0",
"optional": true, "optional": true,
"os": [ "os": [
@ -4488,9 +4458,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/openseadragon": { "node_modules/openseadragon": {
"version": "5.0.1", "version": "6.0.2",
"resolved": "https://registry.npmjs.org/openseadragon/-/openseadragon-5.0.1.tgz", "resolved": "https://registry.npmjs.org/openseadragon/-/openseadragon-6.0.2.tgz",
"integrity": "sha512-a/hjouW9i3UfWxRADVYN2MyRhXMGnE7x9VVL7/4jXCcDLFyO4UM5o4RStYtqa5BfaHw/wMNAaD2WbxQF8f1pJg==", "integrity": "sha512-WNPPQWp9sHunyzkV9J2yhfxnSfDF9CfBsE6unmkdxh1uTWzFcueMvBPhmuZdY7M1v/ffJ3NdaF3Qq3jogphIbA==",
"license": "BSD-3-Clause", "license": "BSD-3-Clause",
"funding": { "funding": {
"url": "https://opencollective.com/openseadragon" "url": "https://opencollective.com/openseadragon"
@ -5772,16 +5742,16 @@
} }
}, },
"node_modules/typescript-eslint": { "node_modules/typescript-eslint": {
"version": "8.59.4", "version": "8.60.0",
"resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.59.4.tgz", "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.60.0.tgz",
"integrity": "sha512-Rw6+44QNFaXtgHSjPy+Kw8hrJniMYzR85E9yLmOLcfZ91/rz+JXQbDTCmc6ccxMPY6K6PgAq26f0JCBfR7LIPQ==", "integrity": "sha512-9f65qWLZdAW9m1JaxBDUHcqRUfL8bkxxXL7XxEfI+F09q56PkBvIfCjLF3yInsDM/BBmwkqmCQdCZe/RYlIWEw==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@typescript-eslint/eslint-plugin": "8.59.4", "@typescript-eslint/eslint-plugin": "8.60.0",
"@typescript-eslint/parser": "8.59.4", "@typescript-eslint/parser": "8.60.0",
"@typescript-eslint/typescript-estree": "8.59.4", "@typescript-eslint/typescript-estree": "8.60.0",
"@typescript-eslint/utils": "8.59.4" "@typescript-eslint/utils": "8.60.0"
}, },
"engines": { "engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0" "node": "^18.18.0 || ^20.9.0 || >=21.1.0"

View file

@ -21,10 +21,10 @@
"dependencies": { "dependencies": {
"@vueuse/core": "^14.3.0", "@vueuse/core": "^14.3.0",
"axios": "^1.16.1", "axios": "^1.16.1",
"material-symbols": "^0.44.8", "material-symbols": "^0.44.9",
"mitt": "^3.0.1", "mitt": "^3.0.1",
"mousetrap": "^1.6.5", "mousetrap": "^1.6.5",
"openseadragon": "^5.0.0", "openseadragon": "^6.0.2",
"pinia": "^3.0.4", "pinia": "^3.0.4",
"pinia-plugin-persistedstate": "^4.7.1", "pinia-plugin-persistedstate": "^4.7.1",
"uikit": "^3.25.16", "uikit": "^3.25.16",
@ -54,8 +54,8 @@
"stylelint": "^17.12.0", "stylelint": "^17.12.0",
"stylelint-config-standard": "^40.0.0", "stylelint-config-standard": "^40.0.0",
"stylelint-config-standard-less": "^4.1.0", "stylelint-config-standard-less": "^4.1.0",
"typescript-eslint": "^8.59.4", "typescript-eslint": "^8.60.0",
"vite": "^8.0.13", "vite": "^8.0.14",
"vitest": "^4.1.7" "vitest": "^4.1.7"
}, },
"overrides": { "overrides": {

View file

@ -39,11 +39,10 @@ export default {
}, },
watch: { watch: {
src: { src() {
immediate: true, if (this.osdViewer) {
handler(newVal) { this.loadOpenSeaDragon();
this.loadOpenSeaDragon(newVal); }
},
}, },
brightness() { brightness() {
this.updateFilter(); this.updateFilter();
@ -62,18 +61,15 @@ export default {
([{ isIntersecting }]) => { ([{ isIntersecting }]) => {
this.visibilityChanged(isIntersecting); this.visibilityChanged(isIntersecting);
}, },
{ threshold: 0.0 }, { threshold: 0.0, rootMargin: "500px" },
); );
if (this.src) {
this.loadOpenSeaDragon(this.src);
}
}, },
beforeUnmount() { beforeUnmount() {
// Remove global signal listener to perform a gallery refresh // Remove global signal listener to perform a gallery refresh
if (this.osdViewer) { if (this.osdViewer) {
this.osdViewer.destroy(); this.osdViewer.destroy();
this.osdViewer = null;
} }
}, },
@ -82,7 +78,7 @@ export default {
// adding this check to avoid error when the viewer is not yet initialized. // adding this check to avoid error when the viewer is not yet initialized.
if (isVisible) { if (isVisible) {
if (!this.osdViewer && this.src) { if (!this.osdViewer && this.src) {
this.loadOpenSeaDragon(this.src); this.loadOpenSeaDragon();
} }
} else { } else {
// Don't destroy if viewer is in fullscreen // Don't destroy if viewer is in fullscreen
@ -96,18 +92,37 @@ export default {
async loadOpenSeaDragon() { async loadOpenSeaDragon() {
if (this.osdViewer) { if (this.osdViewer) {
this.osdViewer.destroy(); this.osdViewer.destroy();
this.osdViewer = null;
} }
await this.$nextTick(); await this.$nextTick();
if (this.$refs.osdContainer) {
this.$refs.osdContainer.innerHTML = "";
}
this.osdViewer = OpenSeaDragon({ this.osdViewer = OpenSeaDragon({
element: this.$refs.osdContainer, element: this.$refs.osdContainer,
crossOriginPolicy: "Anonymous", crossOriginPolicy: "Anonymous",
drawer: "auto",
preserveViewport: false,
buildPyramid: false,
tileSources: this.src, tileSources: this.src,
showNavigationControl: false, showNavigationControl: false,
maxZoomPixelRatio: 2, maxZoomPixelRatio: 2,
gestureSettingsMouse: { gestureSettingsMouse: {
clickToZoom: false, clickToZoom: false,
}, },
imageLoaderLimit: 1,
maxImageCacheCount: 300,
timeout: 30000,
}); });
// This detects if the OSD API has Context Recovery and enables it
if (
this.osdViewer.drawer &&
typeof this.osdViewer.drawer.setContextRecoveryEnabled === "function"
) {
this.osdViewer.drawer.setContextRecoveryEnabled(true);
}
this.updateFilter(); this.updateFilter();
}, },