aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/PropertiesView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-09-02 12:32:11 -0400
committerbobzel <zzzman@gmail.com>2024-09-02 12:32:11 -0400
commit2133a20dfd1346d8eef897f4536dc21e16271537 (patch)
treeb6d35f8bf06c7303a1a74dd79ec88e1d7aa6a688 /src/client/views/PropertiesView.tsx
parent82a619a446c94313f06d86707be28041632c59ea (diff)
minor cleanup
Diffstat (limited to 'src/client/views/PropertiesView.tsx')
-rw-r--r--src/client/views/PropertiesView.tsx19
1 files changed, 7 insertions, 12 deletions
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<PropertiesViewProps
@computed get colorFil() { return this.containsInkDoc ? StrCast(this.inkDoc?.[DocData].fillColor) : StrCast(this.selectedDoc?.[DocData].fillColor); } // prettier-ignore
set colorFil(value) {
- if (this.containsInkDoc) {
- const childDocs = DocListCast(this.selectedDoc[DocData].data);
- childDocs.forEach(doc => {
- 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) {