When any of the 4 corner handles of the image is dragged, the image should scale proportionally either up or down.
Problem: With my current attempt as shown in the jsfiddle linked below, when the topLeft
handles are dragged vertically, the image rescales proportionally, but the other handles flicker. When the same topLeft
handle is dragged horizontally, the image simply moves without resizing.
How can proportional scaling be implemented with KineticJS? Thank you!!!
jsfiddle: http://jsfiddle.net/zb3Km/
Going by this.....
math/algorithm Fit image to screen retain aspect ratio
I got this.....
http://jsfiddle.net/zb3Km/2/
EDIT:
http://jsfiddle.net/zb3Km/3/
Made the anchors snap back after your finished resizing
EDIT2: Now anchors the resize to the opposite corner.
http://jsfiddle.net/jdA3y/