Skip to content

Commit

Permalink
[bugfix] Fix zooming in in Firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
g3force committed Aug 25, 2018
1 parent ccccb50 commit 64b7794
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/Field.vue
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,12 @@
return d;
},
updateCanvasWidth() {
this.canvasWidth = this.$refs.canvas.clientWidth;
// Firefox does not support clientWidth for SVG, so fall back to the parent element
this.canvasWidth = this.$refs.canvas.clientWidth || this.$refs.canvas.parentNode.clientWidth;
},
updateCanvasHeight() {
this.canvasHeight = this.$refs.canvas.clientHeight;
// Firefox does not support clientWidth for SVG, so fall back to the parent element
this.canvasHeight = this.$refs.canvas.clientHeight || this.$refs.canvas.parentNode.clientHeight;
},
textTransform(p) {
if (this.rotateField) {
Expand Down

0 comments on commit 64b7794

Please sign in to comment.