flowhub / the-graph

SVG custom elements for FBP graph editing and visualization. Used in noflo/noflo-ui
https://flowhub.github.io/the-graph/demo-full.html
MIT License
1.01k stars 178 forks source link

`Nested transactions not supported` error #376

Open Dragomir-Ivanov opened 6 years ago

Dragomir-Ivanov commented 6 years ago

When playing with the-graph, trying to rapidly drag random nodes, quite often the drag operation doesn't happen, and in the JS console Nested transactions not supported appears. What are these nested transactions in question? Thanks a lot.

bergie commented 6 years ago

the-graph uses the journal functionality from fbp-graph to bundle related operations together in a single transaction (for instance, removing a node and its associated edges together). Some background in https://github.com/noflo/noflo-ui/issues/23

In this case it seems there are situations where user interaction (like dragging) didn't finish its transaction, and then a new dragging operation tries to start a new transaction which fails since there is one still active.

So yeah, sounds like a bug in drag-and-drop event handling

Dragomir-Ivanov commented 6 years ago

@bergie Thanks for the quick answer. I guess we can make an exception about drag operation and allow its restarting without previous drag being ended. I had another question here, can you take a look when time permits. #360