diff options
-rw-r--r-- | src/client/views/PropertiesView.tsx | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx index 722086aea..229ceffe2 100644 --- a/src/client/views/PropertiesView.tsx +++ b/src/client/views/PropertiesView.tsx @@ -816,7 +816,7 @@ export class PropertiesView extends ObservableReactComponent<PropertiesViewProps } @computed get selectedStrokes() { - return this.containsInkDoc ? DocListCast(this.selectedDoc[DocData].data) : this.selectedDoc ? [this.selectedDoc] : []; + return this.containsInkDoc ? DocListCast(this.selectedDoc[DocData].data) : DocumentView.SelectedSchemaDoc() ? [DocumentView.SelectedSchemaDoc()!] : DocumentView.SelectedDocs().filter(doc => doc.layout_isSvg); } @computed get shapeXps() { return NumCast(this.selectedDoc?.x); } // prettier-ignore set shapeXps(value) { this.selectedDoc && (this.selectedDoc.x = Math.round(value * 100) / 100); } // prettier-ignore @@ -1015,7 +1015,9 @@ export class PropertiesView extends ObservableReactComponent<PropertiesViewProps } @computed get widthStk() { return this.getField('stroke_width') || '1'; } // prettier-ignore set widthStk(value) { - this.selectedDoc && (this.selectedDoc[DocData].stroke_width = Number(value)); + this.selectedStrokes.forEach(doc => { + doc[DocData].stroke_width = Number(value); + }); } @computed get markScal() { return Number(this.getField('stroke_markerScale') || '1'); } // prettier-ignore set markScal(value) { @@ -1025,7 +1027,9 @@ export class PropertiesView extends ObservableReactComponent<PropertiesViewProps } @computed get smoothAmt() { return Number(this.getField('stroke_smoothAmount') || '5'); } // prettier-ignore set smoothAmt(value) { - this.selectedDoc && (this.selectedDoc[DocData].stroke_smoothAmount = Number(value)); + this.selectedStrokes.forEach(doc => { + doc[DocData].stroke_smoothAmount = Number(value); + }); } @computed get markHead() { return this.getField('stroke_startMarker') || ''; } // prettier-ignore set markHead(value) { @@ -1315,14 +1319,9 @@ export class PropertiesView extends ObservableReactComponent<PropertiesViewProps }; @computed get inkCollectionSubMenu() { - return ( - // prettier-ignore - <> - <PropertiesSection title="Ink Appearance" isOpen={this.openAppearance} setIsOpen={bool => { this.openAppearance = bool; }} onDoubleClick={this.CloseAll}> - {this.isGroup && this.containsInk(this.selectedDoc) ? this.appearanceEditor : null} - </PropertiesSection> - </> - ); + return <PropertiesSection title="Ink Appearance" isOpen={this.openAppearance} setIsOpen={bool => { this.openAppearance = bool; }} onDoubleClick={this.CloseAll}> + {this.isGroup && this.containsInk(this.selectedDoc) ? this.appearanceEditor : null} + </PropertiesSection>; // prettier-ignore } @computed get fieldsSubMenu() { |