GUI: Allow easier mouse-based navigation
bavovanachte opened this issue · 3 comments
Hi,
First of all: thanks a lot for this tool. It looks very promising, and I hope we can start to use it soon.
We are considering using it specifically for fault tree construction and analysis.
I've noticed that constructing and navigating the fault tree in the scram-gui is a bit awkward, when comparing it to more modern diagramming tools.
What could already improve the experience drastically (in my opinion) is to allow:
- Dragging the window around using the middle mouse button (https://gist.github.com/Legor/a00760b6d7af32c01357fb7ff76ad86a, haven't tested)
- Allow zooming in and out using the scroll wheel.
I would be open to contribute a PR for this myself, but want to check your opinion on it first.
Thanks @bavovanachte .
I like the idea of moving the graphics with the middle click.
Some software allow it with the left click
as long as it is on empty space.
However, the middle click must be simpler to implement.
PR is definitely welcome.
As for the zooming with the scroll wheel,
it is available while holding Ctrl.
This approach is universal across tools.
PR #278 for dragging the window around
As for the zooming, I suggested it because the current scroll behaviour is not very useful in the sense that it only allows you to scroll vertically (where the trees also tend to grow horizontally). It seemed a quick win to get rid of the keyboard in order to navigate the tree.
Anyway, the usability gain of this is minimal compared to the dragging thing, so I won't be pushy about it 😄 . If you change your mind, I can create a PR for that as well.
As for the zooming, I suggested it because the current scroll behaviour is not very useful in the sense that it only allows you to scroll vertically (where the trees also tend to grow horizontally). It seemed a quick win to get rid of the keyboard in order to navigate the tree.
You should be able to scroll horizontally with the current implementation.