mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
profile: implement panning of profile
When zoomed in, the profile position was moved by hovering with the mouse. What a horrible user experience. This is especially useless if we want to implement an interactive profile on mobile. Instead, let the user start the panning with a mouse click. The code is somewhat nasty, because the position is given as a real in the [0,1] range, which represents all possible positions from completely to the left to completely to the right. This commit also removes the restriction that the planner handles can only be moved when fully zoomed out. It is not completely clear what the implications are. Let's see. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
0d92ef2835
commit
edf2a2f4f4
7 changed files with 63 additions and 29 deletions
|
@ -142,6 +142,9 @@ private:
|
|||
const struct dive *d;
|
||||
int dc;
|
||||
bool empty; // No dive shown.
|
||||
bool panning; // Currently panning.
|
||||
double panningOriginalMousePosition;
|
||||
double panningOriginalProfilePosition;
|
||||
#ifndef SUBSURFACE_MOBILE
|
||||
DiveLineItem *mouseFollowerVertical;
|
||||
DiveLineItem *mouseFollowerHorizontal;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue