fix warmers
This commit is contained in:
+1
@@ -3,6 +3,7 @@
|
||||
class="resistance"
|
||||
:key="selected"
|
||||
@click="$emit('click')"
|
||||
v-on:touchend="$emit('click')"
|
||||
:style="{backgroundColor:`rgb(${currentColor})`}"
|
||||
>{{channel.setpointHMI}} %</div>
|
||||
</template>
|
||||
|
||||
+18
-1
@@ -119,6 +119,17 @@ export default class Warmers extends Vue {
|
||||
controlIconsEnabled: false,
|
||||
fit: true,
|
||||
center: true,
|
||||
beforePan: function () {
|
||||
var z = this.getZoom();
|
||||
return z > 1;
|
||||
},
|
||||
beforeZoom: function (o, n) {
|
||||
if (n <= 1) {
|
||||
this.center(); this.fit();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}, 500)
|
||||
}
|
||||
@@ -154,6 +165,8 @@ export default class Warmers extends Vue {
|
||||
|
||||
let point1 = (this.$refs.warmer as SVGSVGElement)?.createSVGPoint();
|
||||
let point2 = (this.$refs.warmer as SVGSVGElement)?.createSVGPoint();
|
||||
let point3 = (this.$refs.warmer as SVGSVGElement)?.createSVGPoint();
|
||||
let point4 = (this.$refs.warmer as SVGSVGElement)?.createSVGPoint();
|
||||
|
||||
if (lazo && point1 && point2)
|
||||
for (const row of this.rows) {
|
||||
@@ -162,8 +175,12 @@ export default class Warmers extends Vue {
|
||||
point1.y = row * this.height;
|
||||
point2.x = point1.x + this.width * cell.dimension;
|
||||
point2.y = point1.y + this.height;
|
||||
point3.x = point1.x;
|
||||
point3.y = point2.y;
|
||||
point4.x = point2.x;
|
||||
point4.y = point1.y;
|
||||
|
||||
if (lazo.isPointInFill(point1) && lazo.isPointInFill(point2)) {
|
||||
if (lazo.isPointInFill(point1) || lazo.isPointInFill(point2) || lazo.isPointInFill(point3) || lazo.isPointInFill(point4)) {
|
||||
captured.add(cell.idChannel);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user