There is a bug where the scale property is null in the object returned bygetMetadata() after uploading an image that has the same dimensions as the previous image.
The reason for this is because the scaleRatio property is set automatically via Vue watchers when the width and height change, however when changing images, scaleRatio gets initialised back to null within the _initialize() method. This is fine if the width and height change because the watchers are triggered again, but if the width and height are the same then a change is never triggered and scaleRatio remains null.
I have gotten around this by not setting scaleRatio back to null in the _initialize() method. This works well in my case but I am unsure if it is the best approach to take generally speaking. Happy to submit a PR if you're fine with it though.
Hi there, thanks a lot for this plugin!
There is a bug where the
scale
property isnull
in the object returned bygetMetadata()
after uploading an image that has the same dimensions as the previous image.The reason for this is because the
scaleRatio
property is set automatically via Vue watchers when the width and height change, however when changing images,scaleRatio
gets initialised back to null within the_initialize()
method. This is fine if the width and height change because the watchers are triggered again, but if the width and height are the same then a change is never triggered andscaleRatio
remainsnull
.I have gotten around this by not setting
scaleRatio
back tonull
in the_initialize()
method. This works well in my case but I am unsure if it is the best approach to take generally speaking. Happy to submit a PR if you're fine with it though.