diff options
author | bobzel <zzzman@gmail.com> | 2023-11-16 21:29:33 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2023-11-16 21:29:33 -0500 |
commit | 51e508e8e4bdd9fe3b33fc3888dbea7d92f8914f (patch) | |
tree | 10dd7cb80709f96b0e868740a03e6c1d8204c678 /src | |
parent | 2dca9078e46293c0fe5f580171c1550f182530cb (diff) |
added padding slider for groups in properties view.
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/PropertiesView.tsx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx index 49bf982ec..b7f84309e 100644 --- a/src/client/views/PropertiesView.tsx +++ b/src/client/views/PropertiesView.tsx @@ -119,6 +119,9 @@ export class PropertiesView extends React.Component<PropertiesViewProps> { @computed get isInk() { return this.selectedDoc?.type === DocumentType.INK; } + @computed get isGroup() { + return this.selectedDoc.isGroup; + } @computed get isStack() { return [CollectionViewType.Stacking, CollectionViewType.NoteTaking].includes(this.selectedDoc?.type_collection as any); } @@ -1098,6 +1101,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> { <div className="transform-editor"> {!this.isStack ? null : this.getNumber('Gap', ' px', 0, 200, NumCast(this.selectedDoc!.gridGap), (val: number) => !isNaN(val) && (this.selectedDoc!.gridGap = val))} {!this.isStack ? null : this.getNumber('xMargin', ' px', 0, 500, NumCast(this.selectedDoc!.xMargin), (val: number) => !isNaN(val) && (this.selectedDoc!.xMargin = val))} + {!this.isGroup ? null : this.getNumber('Padding', ' px', 0, 500, NumCast(this.selectedDoc!.xPadding), (val: number) => !isNaN(val) && (this.selectedDoc!.xPadding = this.selectedDoc!.yPadding = val))} {this.isInk ? this.controlPointsButton : null} {this.getNumber('Width', ' px', 0, Math.max(1000, this.shapeWid), this.shapeWid, (val: number) => !isNaN(val) && (this.shapeWid = val), 1000, 1)} {this.getNumber('Height', ' px', 0, Math.max(1000, this.shapeHgt), this.shapeHgt, (val: number) => !isNaN(val) && (this.shapeHgt = val), 1000, 1)} |