Skip to content

Commit

Permalink
feat: hide penMode button on reload if not enabled (excalidraw#4992)
Browse files Browse the repository at this point in the history
  • Loading branch information
dwelle authored Mar 30, 2022
1 parent 734bb4d commit 9ba7ca3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/data/restore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,10 @@ export const restoreAppState = (
}
return {
...nextAppState,
// reset on fresh restore so as to hide the UI button if penMode not active
penDetected:
localAppState?.penDetected ??
(appState.penMode ? appState.penDetected ?? false : false),
activeTool: {
lastActiveToolBeforeEraser: null,
locked: nextAppState.activeTool.locked ?? false,
Expand Down

0 comments on commit 9ba7ca3

Please sign in to comment.