aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/PropertiesView.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/PropertiesView.tsx')
-rw-r--r--src/client/views/PropertiesView.tsx15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx
index 18d5f1642..8e2426006 100644
--- a/src/client/views/PropertiesView.tsx
+++ b/src/client/views/PropertiesView.tsx
@@ -756,6 +756,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
@computed get dashdStk() { return this.selectedDoc?.strokeDash || ""; }
@computed get unStrokd() { return this.selectedDoc?.color ? true : false; }
@computed get widthStk() { return this.getField("strokeWidth") || "1"; }
+ @computed get markScal() { return Number(this.getField("strokeMakerScale") || "1"); }
@computed get markHead() { return this.getField("strokeStartMarker") || ""; }
@computed get markTail() { return this.getField("strokeEndMarker") || ""; }
set solidStk(value) { this.dashdStk = ""; this.unStrokd = !value; }
@@ -763,6 +764,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
value && (this._lastDash = value) && (this.unStrokd = false);
this.selectedDoc && (this.selectedDoc.strokeDash = value ? this._lastDash : undefined);
}
+ set markScal(value) { this.selectedDoc && (this.selectedDoc.strokeMarkerScale = Number(value)); }
set widthStk(value) { this.selectedDoc && (this.selectedDoc.strokeWidth = Number(value)); }
set unStrokd(value) { this.colorStk = value ? "" : this._lastLine; }
set markHead(value) { this.selectedDoc && (this.selectedDoc.strokeStartMarker = value); }
@@ -770,6 +772,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
@computed get stkInput() { return this.regInput("stk", this.widthStk, (val: string) => this.widthStk = val); }
+ @computed get markScaleInput() { return this.regInput("scale", this.markScal.toString(), (val: string) => this.markScal = Number(val)); }
regInput = (key: string, value: any, setter: (val: string) => {}) => {
@@ -807,6 +810,18 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
<div className="arrows">
<div className="arrows-head">
+ <div className="width-top">
+ <div className="width-title">Arrow Scale:</div>
+ {/* <div className="width-input">{this.markScalInput}</div> */}
+ </div>
+ <input className="width-range" type="range"
+ defaultValue={this.markScal} min={0} max={10}
+ onChange={(action(e => this.markScal = +e.target.value))}
+ onMouseDown={(e) => { this._widthUndo = UndoManager.StartBatch("scale undo"); }}
+ onMouseUp={(e) => { this._widthUndo?.end(); this._widthUndo = undefined; }}
+ />
+ </div>
+ <div className="arrows-head">
<div className="arrows-head-title" >Arrow Head: </div>
<input key="markHead" className="arrows-head-input" type="checkbox"
checked={this.markHead !== ""}