Our company website uses elements canvasto display graphs and charts on our pages. However, they cannot be dragged and, for example, in Microsoft Word Document or mail client. So I developed a way to replace the canvas with an identical imgmouse down view , getting base64 data from the canvas.
The canvas is properly replaced by the image on mousedown and placed back into the mouseup. However, this does not allow you to drag the image tag, possibly because the replacement is too late.
Here is a working JSFiddle example.
We use a plugin that also provides tooltips for specific areas of the charts, so I cannot replace elements on hover / freeze, as this will stop the tooltips.
How to make dragging and dropping the image itself possible?
source
share