simplajs / simpla-img

An editable image you can update inline, built on Simpla
https://www.simplajs.org
MIT License
6 stars 3 forks source link

Scale to minimum size from center #43

Open bedeoverend opened 7 years ago

bedeoverend commented 7 years ago

If the image is too small to edit, the editor automatically scales up to the minimum size - this just adjusts the height / width of the image, which means it scales from the top left origin point. Instead this should adjust left / top to account for the change in size so it appears it's scaling from the center of the image.

madeleineostoja commented 7 years ago

This should also be smoothly transitioned, which I can tackle once this is fixed (should just be able to apply CSS transforms then reset bounds in next render frame)