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

toggling the eraser should switch back to the previous tool instead of the select tool #4978

Closed
zsviczian opened this issue Mar 27, 2022 · 3 comments · Fixed by #4981
Closed
Labels
enhancement New feature or request

Comments

@zsviczian
Copy link
Collaborator

Toggling the eraser should switch back to the previous tool (i.e. the one before clicking eraser) instead of switching to the select tool. You can configure the stylus button to toggle the eraser. If toggling would switch to the original tool (e.g. freedraw) instead of the select tool, that would remove friction from the workflow.

@dwelle dwelle added the enhancement New feature or request label Mar 27, 2022
@dwelle
Copy link
Member

dwelle commented Mar 27, 2022

Good idea.

Our recent refactor of appState.elementTypeappState.activeTool (#4968) will come in handy as we can put all these state in there.

@zsviczian
Copy link
Collaborator Author

@dwelle so your suggestion is to extend activeTool something like this:

activeTool: { 
  type: typeof SHAPES[number]["value"] | "eraser",
  previousTool?: typeof SHAPES[number]["value"] | "eraser"
};

Right now I can only think of the eraser toggle use case. Should this be eraser specific? Then instead of previousTool something like eraserToggleWithType might be a better name.

@dwelle
Copy link
Member

dwelle commented Mar 27, 2022

IMO it doesn't matter much, but yes, we can be more clear. eraserPreviousTool/eraserPreviousType?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants