简体   繁体   中英

Drag the image tag inside the group tag of svg

Image tag has been appended inside the group tag of the svg.when the mouse is kept over the group tag and it is dragged the image inside the group tag is not shown ,it shows like a file . I want the image to be dragged not the src file of the image.

SVG is a vector graphics, an image file. Though it supports some animation using javascript, it doesn't support DOM level user interaction like dragging with mouse, unlike HTML DOM Elements.

Also to be noted, it is rendered with the help of CPU and is CPU intensive work, so I don't think dragging group tag insige an SVG is a good idea.

One last thing to be noted, SVG support may vary browser-wise. So, to make your work consistent among the browsers will be a tricky part.

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