From 2133a20dfd1346d8eef897f4536dc21e16271537 Mon Sep 17 00:00:00 2001 From: bobzel Date: Mon, 2 Sep 2024 12:32:11 -0400 Subject: minor cleanup --- src/client/views/LightboxView.tsx | 2 +- src/client/views/PropertiesView.tsx | 19 +++++++------------ .../views/collections/CollectionCarouselView.tsx | 2 +- 3 files changed, 9 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/client/views/LightboxView.tsx b/src/client/views/LightboxView.tsx index 77a2c1b86..331b3db64 100644 --- a/src/client/views/LightboxView.tsx +++ b/src/client/views/LightboxView.tsx @@ -35,7 +35,7 @@ type LightboxSavedState = { [key: string]: FieldResult; }; // prettier-ignore @observer export class LightboxView extends ObservableReactComponent { /** - * Determines whether a DocumentView is descendant of the lightbox view + * Determines whether a DocumentView is descendant of the lightbox view (or any of its pop-ups like the annotationPalette) * @param view * @returns true if a DocumentView is descendant of the lightbox view */ diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx index 6383d4947..9299705ee 100644 --- a/src/client/views/PropertiesView.tsx +++ b/src/client/views/PropertiesView.tsx @@ -868,18 +868,13 @@ export class PropertiesView extends ObservableReactComponent { - const inkStroke = DocumentView.getDocumentView(doc)?.ComponentView as InkingStroke; - const { inkData } = inkStroke.inkScaledData(); - if (InkingStroke.IsClosed(inkData)) { - doc[DocData].fillColor = value || undefined; - } - }); - } else { - this.selectedDoc && (this.selectedDoc[DocData].fillColor = value || undefined); - } + this.selectedStrokes.forEach(doc => { + const inkStroke = DocumentView.getDocumentView(doc)?.ComponentView as InkingStroke; + const { inkData } = inkStroke.inkScaledData(); + if (InkingStroke.IsClosed(inkData)) { + doc[DocData].fillColor = value || undefined; + } + }); } @computed get colorStk() { return this.containsInkDoc ? StrCast(this.inkDoc?.[DocData].color) : StrCast(this.selectedDoc?.[DocData].color); } // prettier-ignore set colorStk(value) { diff --git a/src/client/views/collections/CollectionCarouselView.tsx b/src/client/views/collections/CollectionCarouselView.tsx index 7ce4ecc2f..264a34680 100644 --- a/src/client/views/collections/CollectionCarouselView.tsx +++ b/src/client/views/collections/CollectionCarouselView.tsx @@ -156,7 +156,7 @@ export class CollectionCarouselView extends CollectionSubView() { // NativeHeight={returnZero} fitWidth={returnTrue} setContentViewBox={undefined} - containerViewPath={this.DocumentView?.().docViewPath} + containerViewPath={this._props.docViewPath} onDoubleClickScript={this.onContentDoubleClick} onClickScript={this.onContentClick} isDocumentActive={this._props.childDocumentsActive?.() ? this._props.isDocumentActive : this._props.isContentActive} -- cgit v1.2.3-70-g09d2