draw2d icon indicating copy to clipboard operation
draw2d copied to clipboard

Scroll canvas while dragging or connect nodes

Open Samanoova opened this issue 4 years ago • 5 comments

Hi is there any feature od what is the best way to make it when I have a large draw and many shapes and want to make it smooth to move shapes and connect between them by making an auto-scrolling while dragging the shapes

something like the video but more smooth I mean without stopping the node like a fixed position element while scrolling and I want to make canvas size grow as required (unlimited size and grow as you scroll)

Samanoova avatar Jan 12 '21 10:01 Samanoova

I would like to second this request. I managed to autoscroll the canvas by watching the mousemove event and adjusting scrollLeft / scrollTop. But if I do so, the drag operation breaks, the dragged object kind of lags behind, the cursor is not on the object anymore. Looks like coordinate calculation of the drag operation somehow gets messed up by my interfering with the scroll position during drag.

kleins05 avatar Mar 04 '21 07:03 kleins05

we cant fire a drag event with the same values of scrolling or something?

Samanoova avatar Mar 09 '21 15:03 Samanoova

@Samanoova i am looking for the same have you found solution?

ganeshpatwaypi avatar May 01 '22 11:05 ganeshpatwaypi

@ganeshpatwaypi I wrote my own custom function for that but still don't working on connection it's working with shapes only

Samanoova avatar May 01 '22 22:05 Samanoova

Bump on this, it is kind of problematic for bigger canvas since this is an issue that happens very often

snakex64 avatar Apr 20 '23 23:04 snakex64