Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable stroke while panning or zooming #302

Merged
merged 2 commits into from
Sep 20, 2024

Conversation

Zacrain
Copy link
Contributor

@Zacrain Zacrain commented Sep 14, 2024

Closes #301 .

Branched off main. Tested in debug and Windows release export.

Notable changes and explanation of new behaviour:

  • While panning or zooming drawing will no longer be possible.
  • The brush tool has a special behaviour: when starting to draw with the brush, then starting to zoom, the brush stroke is ended.
  • No matter the tool, if you start drawing and then pan while drawing, you can continue drawing smoothly from where you left off once you stop panning.
  • Except for the brush tool, geometric shapes can be adjusted while zooming after they have been initiated.

Observed bugs:

  • For some reason my graphic tablet's pen movement is not recognized. That seems to be an issue with the main branch though and was not introduced by me.
  • Sometimes, while drawing, panning and or zooming, the cursor might disappear / become invisible. It will reappear upon drawing somewhere again. I was not able to reproduce this issue reliably though.

- End stroking of brush tool when zooming
@Zacrain
Copy link
Contributor Author

Zacrain commented Sep 14, 2024

Remark: I made a small mistake in the commit message. I've written "draw button", but just meant "drawing". Idk where the button came from. Sry.

Copy link
Owner

@mbrlabs mbrlabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is looking good! Just had some naming nitpicks.

lorien/InfiniteCanvas/InfiniteCanvas.gd Outdated Show resolved Hide resolved
lorien/InfiniteCanvas/PanZoomCamera.gd Outdated Show resolved Hide resolved
lorien/InfiniteCanvas/Tools/CanvasTool.gd Show resolved Hide resolved
lorien/InfiniteCanvas/Tools/CanvasTool.gd Outdated Show resolved Hide resolved
@mbrlabs
Copy link
Owner

mbrlabs commented Sep 19, 2024

Sometimes, while drawing, panning and or zooming, the cursor might disappear / become invisible. It will reappear upon drawing somewhere again. I was not able to reproduce this issue reliably though.

Yeah, that's a bug i'm aware of. It has to do with how the app handles input focus. It manually disables/enables the canvas based on where the mouse is and other input events. It's quite messy and needs a rework honestly 😅

Copy link
Owner

@mbrlabs mbrlabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mbrlabs mbrlabs merged commit fbd62e6 into mbrlabs:main Sep 20, 2024
3 checks passed
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.

Disable draw button while panning (or zooming)
2 participants