Need to Drag SVG element


Hello All,

I have SVG element as canvas. Need to drag this canvas when my graph goes beyong candvas width & height.

How to do that. Can anybody help with same?

Thanks, Priyanka.


When you set up the mousemove listener … don’t set it to listen to the canvas element, but instead the document


let handleMoveFn = this.myHandleMoveFunction.bind(this);
$(document).on('mousemove', handleMoveFn);



Whats myHandleMoveFunction function…is it in build in or custom function?


its whatever you want it to be.


i need to drag the div which includes canvas of graph so what it will be…?

Sorry very new to this so could not get it?

Thanks in advance, Priyanka