diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-superiori.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-superiori.vue
index a0ee9588..146a1727 100644
--- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-superiori.vue
+++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-superiori.vue
@@ -67,6 +67,14 @@
+
+
+
+
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/warmers.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/warmers.ts
index 7d74c6d8..14ba365d 100644
--- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/warmers.ts
+++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/warmers.ts
@@ -54,48 +54,23 @@ export default class Warmers extends Vue {
return result;
}
- maxWidth: number = 0;
- maxHeight: number = 0;
- currentViewBoxX: number = 0;
- currentViewBoxY: number = 0;
- currentZoomX: number = 0;
- currentZoomY: number = 0;
-
-
- calcSizes() {
- this.maxWidth = Math.max(...this.rows.map(r => this.resistancesPerRow(r).reduce((p, c) => p + c.dimension, 0))) * this.width;
- this.maxHeight = this.rows.length * this.height;
-
- this.currentViewBoxX = this.maxWidth / 2;
- this.currentViewBoxY = this.maxHeight / 2;
-
- this.currentZoomX = this.maxWidth / 2;
- this.currentZoomY = this.maxHeight / 2;
- }
-
- get viewBox() {
- return [this.currentViewBoxX - this.currentZoomX, this.currentViewBoxY - this.currentZoomY,
- this.currentZoomX * 2, this.currentZoomY * 2];
- }
+ zoomController: any = null;
zoomIn() {
- this.currentZoomY /= 2;
- this.currentZoomX /= 2;
+ this.zoomController?.zoomIn();
}
zoomOut() {
- this.currentZoomY *= 2;
- this.currentZoomX *= 2;
+ this.zoomController?.zoomOut();
}
-
mounted() {
- this.calcSizes();
+ let $this = this;
setTimeout(() => {
- svgPanZoom('#warmer', {
+ $this.zoomController = svgPanZoom('#warmer', {
zoomEnabled: true,
- controlIconsEnabled: true,
+ controlIconsEnabled: false,
fit: true,
center: true,
});
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/warmers.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/warmers.vue
index 31a681f8..3700788c 100644
--- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/warmers.vue
+++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/warmers.vue
@@ -1,5 +1,5 @@
-