Skip to content

Conversation

@rileyhawk1417
Copy link

@JideGuru I was using an older version of your project for reference and managed to get pan and zoom working.
Although the current Flutter Drawing Board code has changed, I was still able to apply the same solution from what I used on my project.

So this PR is meant to serve as a suggestion not a solution, I do know that I probably broke some tests while shifting things around. That's why am putting this as a suggestion, since you might be able to implement it in a way that works better for the code base.

There is also a test video I made.

flutter_drawing_board_pan_test.mp4

There are some things I could not get around to solving.

  • During the pan movement the tool still draws, could be because of the default case in drawing_tool_extensions.dart.
  • After panning and switching back to the drawing tool the mouse cursor still stays stuck at "pan" gesture.

- Had to add the pan case in the drawing types. Otherwise it would be
difficult to set pan in Interactive Viewer.
- BUG: The pan tool is buggy cursor does not revert back to normal after
pan case.
- BUG: Lines still get drawn during panning. Could be because of the
default case in DrawingToolExtensions. Not sure on how to make pan not
draw.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant