@abi-software/scaffoldvuer 1.12.0 → 1.13.0-beta.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abi-software/scaffoldvuer",
3
- "version": "1.12.0",
3
+ "version": "1.13.0-beta.0",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -41,7 +41,7 @@
41
41
  "*.js"
42
42
  ],
43
43
  "dependencies": {
44
- "@abi-software/map-utilities": "^1.7.4",
44
+ "@abi-software/map-utilities": "^1.7.6",
45
45
  "@abi-software/sparc-annotation": "^0.3.2",
46
46
  "@abi-software/svg-sprite": "1.0.2",
47
47
  "@element-plus/icons-vue": "^2.3.1",
@@ -53,7 +53,7 @@
53
53
  "unplugin-vue-components": "^0.26.0",
54
54
  "vue": "^3.4.21",
55
55
  "vue-router": "^4.2.5",
56
- "zincjs": "1.15.1"
56
+ "zincjs": "^1.16.0"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@babel/eslint-parser": "^7.28.0",
@@ -1050,6 +1050,9 @@ export default {
1050
1050
  this.$module.zincRenderer.addPreRenderCallbackFunction(() => {
1051
1051
  this.currentTime = this.$module.getCurrentTime();
1052
1052
  })
1053
+ this.$module.zincRenderer.addContextRestoredCallbackFunction(() => {
1054
+ this.backgroundChangeCallback(this.currentBackground);
1055
+ })
1053
1056
  },
1054
1057
  beforeUnmount: function () {
1055
1058
  if (this.ro) this.ro.disconnect();
@@ -2282,6 +2285,12 @@ export default {
2282
2285
  emitOfflineAnnotationUpdate: function () {
2283
2286
  this.$emit('update-offline-annotation-enabled', this.offlineAnnotationEnabled);
2284
2287
  },
2288
+ forceContextRestore: function() {
2289
+ this.$module.zincRenderer.forceContextRestore();
2290
+ },
2291
+ forceContextLoss: function() {
2292
+ this.$module.zincRenderer.forceContextLoss();
2293
+ },
2285
2294
  /**
2286
2295
  * @public
2287
2296
  * Hide the tooltip
@@ -2812,9 +2821,11 @@ export default {
2812
2821
  toggleRendering: function (flag) {
2813
2822
  if (this.$module.zincRenderer) {
2814
2823
  if (flag) {
2824
+ this.forceContextRestore();
2815
2825
  this.$module.zincRenderer.animate();
2816
2826
  } else {
2817
2827
  this.$module.zincRenderer.stopAnimate();
2828
+ this.forceContextLoss();
2818
2829
  }
2819
2830
  }
2820
2831
  },