parsegraph / freeform

MIT License
1 stars 0 forks source link

Too easy to add nodes or pull nodes when navigating #21

Closed dafrito closed 3 months ago

dafrito commented 4 months ago

This has been partially addressed by several recent changes, but still persists. Keyboard layout avoids most issues, but there's still often a need to click or drag on the graph, which introduces the potential for mouse changes.

The extreme view is to simply disable gestures, and make all actions require one click to center on a node, and another click to perform some action with that node. This seems like it would address this issue overall, but is also extreme, so I would rather put the gestures behind a feature flag.

The other reason why I keep gestures in is for touch, where I think this issue occurs the most.

Current logic for gestures

If the user is mousedown/touchstart on a node, that begins a gesture to spawn/pull if they pull sufficiently (at least the width of height of the node) in any direction, and either:

For mouse, a gesture can also mean a click. For touch, a gesture overrules a click.

The angle of the gesture determines the direction of the node. Only cardinal directions can be spawned with a gesture. If there is a node already in that direction, then then node is pulled in the parent direction (filed bug)

Even if that bug is fixed, a gesture cannot be used to move to a node's parent. It would always be interpreted as a pull.

Extreme approach

Remove all gesture code.

Less extreme approach

Never interpret gestures as pulls or spawning, only moving.

Wait and see approach

Fix other bugs and see if this feeling of "its too easy to change the graph" goes away.

dafrito commented 3 months ago

I think this is fixed. I did nerf gestures a bit, but the toggle for single-tap gestures remains. I did fix that bug, so now this isn't as much of a problem as it was at release. I'll re-open if I find a case where it seems to be still jerky.