diff options
author | bobzel <zzzman@gmail.com> | 2025-06-23 13:26:59 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2025-06-23 13:26:59 -0400 |
commit | 35bd9e51f7cef551382025a5459d68eddd8f028b (patch) | |
tree | 8edab8e8e283d06bdeba632959fd51e1488c4af5 /src/client/views/UndoStack.tsx | |
parent | e7a96fa043cfc9c3c426e09bbef42c8df88a45f6 (diff) |
fixed invalidations to not trigger creating new refs when ref= was assigned to an anonymous function. fixed scribble erase to not delete everything it overlaps, just things it intersects with or contains. fixed ink to have a Math mode and fixed math recognition myscript calls.
Diffstat (limited to 'src/client/views/UndoStack.tsx')
-rw-r--r-- | src/client/views/UndoStack.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/UndoStack.tsx b/src/client/views/UndoStack.tsx index 067020a62..3755b1ec1 100644 --- a/src/client/views/UndoStack.tsx +++ b/src/client/views/UndoStack.tsx @@ -9,6 +9,7 @@ import './UndoStack.scss'; @observer export class UndoStack extends React.Component<object> { + setRef = (r: HTMLDivElement | null) => r?.scroll({ behavior: 'auto', top: (r?.scrollHeight ?? 0) + 20 }); render() { const background = UndoManager.batchCounter.get() ? 'yellow' : SettingsManager.userVariantColor; const color = UndoManager.batchCounter.get() ? 'black' : SettingsManager.userColor; @@ -25,7 +26,7 @@ export class UndoStack extends React.Component<object> { popup={ <div className="undoStack-commandsContainer" - ref={r => r?.scroll({ behavior: 'auto', top: (r?.scrollHeight ?? 0) + 20 })} + ref={this.setRef} style={{ background, color, |