Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scale is null after uploading image with same dimensions as previous image #247

Open
elanclarkson opened this issue Feb 16, 2022 · 0 comments

Comments

@elanclarkson
Copy link

Hi there, thanks a lot for this plugin!

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant