Closed oscfdezdz closed 1 year ago
there shouldn't be an extra method for pan, just the existing cursor movement ones. there you can check for the button press / release.
just the existing cursor movement ones.
I tried using existing on_hover
, it wasn't working and checking with GTK inspector, signal is blocked when button is pressed. I'm probably unaware of something here.
But you can use the existing handler. You can connect more than one signal to this function.
This still doesn't look good. What I would suggest is this: keep all relevant state (cursor pos, pressed buttons, panning start pos, ...) as an attribute of the controller, update these attributes when events occur (mouse movement, ...). After each update call methods to do things, like update the cursor, move the view, ..., based on the state. These methods should't work with event objects at all. Doing it in this way will make it clearer what the rules are that you want to implement.
I can't get it to work, so I think I'd better close this.
Fix #253