litegraph.js
litegraph.js copied to clipboard
Touch position wrong when scrolled
When scrolled, mouse event position is wrong and dont touch a slot in node.
Sugestion: Line 4879
e.canvasX = e.offsetX;
e.canvasY = e.offsetY;
I will check it next week, never embeded a graph in a regular website
After more test, I suggest:
Lines 2864 and 2865
e.localX = e.offsetX;
e.localY = e.offsetY;
Hi, was this issue corrected? Because when using litegraph on a page that has scrolled down, I can't select the nodes unless i click a little bit up of the node (the size of the scroll).
I just uploaded a version, let me know if the bug is fixed.
Hi @jagenjo, the issue was corrected on Chrome and Firefox, but it persists on Edge (42.17134.1.0), don't know if you plan to support that browser.
I guess thats a bug from edge, the current function relies on clientY and getClientBoundingRect which are well defined functions in the standard, so if some weird thing happens in Edge it must be a bug on that browser. If you manage to see a work around let me know, I cannot test it as I dont have Edge. I leave this issue open.
Ok, I'll try to run some tests and check if I can find out a fix with the update that you uploaded today.