We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 46632d9 commit fb4b9beCopy full SHA for fb4b9be
src/cropper.vue
@@ -377,6 +377,16 @@ export default {
377
x = 1 - speed
378
}
379
380
+ // when a new image is loaded with the same aspect ratio
381
+ // as the previously remove()d one, the imgData.width and .height
382
+ // effectivelly don't change (they change through one tick
383
+ // and end up being the same as before the tick, so the
384
+ // watchers don't trigger), make sure scaleRatio isn't null so
385
+ // that zooming works...
386
+ if (this.scaleRatio === null) {
387
+ this.scaleRatio = this.imgData.width / this.naturalWidth
388
+ }
389
+
390
this.scaleRatio *= x
391
},
392
0 commit comments