freegroup / draw2d

Create Visio like drawings, diagrams or workflows with JavaScript and HTML5
https://freegroup.github.io/draw2d/#/examples
MIT License
734 stars 226 forks source link

Scrolling breaks draw2d #241

Open 28raining opened 1 year ago

28raining commented 1 year ago

There seems to be a bug that if the page is scrolled at all Draw2D stops working. At least that is what I experienced.

To fix this I swapped; this.setScrollArea(document.body);

For; this.setScrollArea(window);

prompted by this; https://stackoverflow.com/questions/32277323/jquery-scrolltop-method-not-working

It took me a really long time to debug that! Hope it's helpful... I think perhaps scrolling never worked? Or just in my setup...