简体   繁体   中英

Making a draggable, resizable image on canvas

I am reading this tutorial about making draggable and resizable rectangles http://simonsarris.com/blog/225-canvas-selecting-resizing-shape

It is a good one and I want to create a similar one using images and this is what I had done http://jsfiddle.net/LUhsK/2/

all i had done is to change the script that instead of drawing a square I draw an image given the image source, initial X, initial Y, width and height but as you can see it doesn't work. I really can't find what seems to be the problem

If I clearly understood what you are searching for I guess it can be easily resolved with

droppedElement = ui.helper.clone();
droppedElement.resizable();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM