Skip to content

Commit

Permalink
fix: drawing ration
Browse files Browse the repository at this point in the history
Signed-off-by: Vitor Mattos <[email protected]>
  • Loading branch information
vitormattos committed Nov 17, 2024
1 parent f5c8448 commit d7a5a31
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Components/Drawing.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export default {
dx: 0,
dy: 0,
dw: 0,
dh: 0,
direction: '',
// ratio: this.originWidth / this.originHeight,
}
Expand Down Expand Up @@ -117,6 +118,7 @@ export default {
let d = -Infinity
d = Math.max(_dx, _dy * this.ratio)
this.dw = d
this.dh = d / this.ratio
}
}
},
Expand All @@ -143,11 +145,13 @@ export default {
x: this.x + this.dx,
y: this.y + this.dy,
width: this.width + this.dw,
height: this.height + this.dh,
scale: (this.width + this.dw) / this.originWidth,
})
this.dx = 0
this.dy = 0
this.dw = 0
this.dh = 0
this.direction = ''
}
this.operation = ''
Expand Down

0 comments on commit d7a5a31

Please sign in to comment.