re-add missing method

This commit is contained in:
Tamius Han 2022-11-21 20:46:51 +01:00
parent 44e3395835
commit f7a82ccdf7

View File

@ -108,6 +108,12 @@ export default {
'isEditing'
],
methods: {
getZoomForDisplay(axis) {
// zoom is internally handled logarithmically, because we want to have x0.5, x1, x2, x4 ... magnifications
// spaced out at regular intervals. When displaying, we need to convert that to non-logarithmic values.
return `${(Math.pow(2, this.zoom[axis]) * 100).toFixed()}%`
},
toggleZoomAr() {
this.zoomAspectRatioLocked = !this.zoomAspectRatioLocked;
},