mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
feat: hide penMode button on reload if not enabled (#4992)
This commit is contained in:
parent
734bb4d2ed
commit
9ba7ca3845
1 changed files with 4 additions and 0 deletions
|
@ -252,6 +252,10 @@ export const restoreAppState = (
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
...nextAppState,
|
...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: {
|
activeTool: {
|
||||||
lastActiveToolBeforeEraser: null,
|
lastActiveToolBeforeEraser: null,
|
||||||
locked: nextAppState.activeTool.locked ?? false,
|
locked: nextAppState.activeTool.locked ?? false,
|
||||||
|
|
Loading…
Add table
Reference in a new issue