From 35bd9e51f7cef551382025a5459d68eddd8f028b Mon Sep 17 00:00:00 2001 From: bobzel Date: Mon, 23 Jun 2025 13:26:59 -0400 Subject: 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. --- src/client/views/EditableView.tsx | 5 +- src/client/views/GestureOverlay.tsx | 4 +- src/client/views/InkTranscription.tsx | 182 +++++++++++---------- src/client/views/InkingStroke.tsx | 2 +- src/client/views/LightboxView.tsx | 3 +- src/client/views/MainView.tsx | 36 ++-- src/client/views/UndoStack.tsx | 3 +- src/client/views/animationtimeline/Timeline.tsx | 3 +- .../views/collections/CollectionNoteTakingView.tsx | 3 +- .../views/collections/CollectionStackingView.tsx | 10 +- .../CollectionStackingViewFieldColumn.tsx | 12 +- .../views/collections/CollectionTreeView.tsx | 3 +- src/client/views/collections/TreeView.tsx | 3 +- .../collectionFreeForm/CollectionFreeFormView.tsx | 53 +++--- .../collectionFreeForm/FaceCollectionBox.tsx | 3 +- .../collections/collectionFreeForm/MarqueeView.tsx | 39 ++--- .../collectionLinear/CollectionLinearView.tsx | 5 +- .../collectionSchema/CollectionSchemaView.tsx | 24 ++- .../collectionSchema/SchemaCellField.tsx | 4 +- .../collectionSchema/SchemaColumnHeader.tsx | 9 +- .../collectionSchema/SchemaTableCell.tsx | 3 +- src/client/views/global/globalScripts.ts | 2 +- src/client/views/nodes/DataVizBox/DataVizBox.tsx | 7 +- .../DataVizBox/DocCreatorMenu/DocCreatorMenu.tsx | 3 +- .../nodes/DataVizBox/components/Histogram.tsx | 11 +- .../nodes/DataVizBox/components/LineChart.tsx | 11 +- .../views/nodes/DataVizBox/components/PieChart.tsx | 15 +- src/client/views/nodes/DiagramBox.tsx | 6 +- src/client/views/nodes/DocumentContentsView.tsx | 4 +- src/client/views/nodes/DocumentView.tsx | 22 +-- src/client/views/nodes/EquationBox.tsx | 3 +- src/client/views/nodes/FunctionPlotBox.tsx | 3 +- src/client/views/nodes/LabelBox.tsx | 38 +++-- src/client/views/nodes/LinkBox.tsx | 23 +-- src/client/views/nodes/LinkDocPreview.tsx | 9 +- src/client/views/nodes/ScreenshotBox.tsx | 18 +- src/client/views/nodes/calendarBox/CalendarBox.tsx | 35 ++-- .../nodes/chatbot/chatboxcomponents/ChatBox.tsx | 14 +- .../views/nodes/formattedText/FormattedTextBox.tsx | 8 +- src/client/views/nodes/trails/PresBox.tsx | 51 +++--- src/client/views/pdf/GPTPopup/GPTPopup.tsx | 3 +- 41 files changed, 350 insertions(+), 345 deletions(-) (limited to 'src/client/views') diff --git a/src/client/views/EditableView.tsx b/src/client/views/EditableView.tsx index d9447b7ec..deeabaa28 100644 --- a/src/client/views/EditableView.tsx +++ b/src/client/views/EditableView.tsx @@ -236,6 +236,7 @@ export class EditableView extends ObservableReactComponent { return this._editing; }; + setInputRef = (r: HTMLInputElement | HTMLTextAreaElement | null) => (this._inputref = r); renderEditor() { return this._props.autosuggestProps ? ( { ) : this._props.oneLine !== false && this._props.GetValue()?.toString().indexOf('\n') === -1 ? ( { this._inputref = r; }} // prettier-ignore + ref={this.setInputRef} style={{ display: this._props.display, overflow: 'auto', fontSize: this._props.fontSize, minWidth: 20, background: this._props.background }} placeholder={this._props.placeholder} onBlur={e => this.finalizeEdit(e.currentTarget.value, false, true, false)} @@ -270,7 +271,7 @@ export class EditableView extends ObservableReactComponent { ) : (