aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/ContextMenu.tsx
diff options
context:
space:
mode:
authorNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-08-27 19:16:28 -0400
committerNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-08-27 19:16:28 -0400
commitf00a5326fa331859db131bb1d8988db93602830b (patch)
treebf4f0a808581a1f17d8a4f851e0102f3b136f9a9 /src/client/views/ContextMenu.tsx
parent79a93d357cf60657ac60971a0e6dab30d232028f (diff)
maxmatching algorithm
Diffstat (limited to 'src/client/views/ContextMenu.tsx')
-rw-r--r--src/client/views/ContextMenu.tsx9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/client/views/ContextMenu.tsx b/src/client/views/ContextMenu.tsx
index b80d97e81..f5654446d 100644
--- a/src/client/views/ContextMenu.tsx
+++ b/src/client/views/ContextMenu.tsx
@@ -2,7 +2,7 @@
/* eslint-disable react/jsx-props-no-spreading */
/* eslint-disable default-param-last */
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
-import { action, computed, IReactionDisposer, makeObservable, observable } from 'mobx';
+import { action, computed, IReactionDisposer, makeObservable, observable, runInAction } from 'mobx';
import { observer } from 'mobx-react';
import * as React from 'react';
import { DivHeight, DivWidth, returnFalse, setupMoveUpEvents } from '../../ClientUtils';
@@ -222,7 +222,6 @@ export class ContextMenu extends ObservableReactComponent<{}> {
get colorPicker() {
const doc = DocumentView.Selected().lastElement().Document;
- const layoutDoc = doc ? Doc.Layout(doc) : doc;
return (
<div className='contextMenu-borderMenu' style={{position: 'absolute', left: this.pageX,
@@ -239,15 +238,15 @@ export class ContextMenu extends ObservableReactComponent<{}> {
</div>
<SketchPicker
onChange={undoable(
- action((col: ColorResult) => layoutDoc._layout_borderColor = col.hex),
+ action((col: ColorResult) => doc.borderColor = col.hex),
'set stroke color property'
)}
presetColors={[]}
- color={StrCast(layoutDoc._layout_borderColor)}
+ color={StrCast(doc.borderColor)}
/>
<div className='bottom-box'>
<input className='max-min-selector' defaultValue={this._widthMinMax.min} onChange={e => this._widthMinMax.max = e.target.value}/>
- <input className='width-selector' type="range" min={this._widthMinMax.min} max={this._widthMinMax.max} value={this._selectorWidth} id="myRange" onChange={e => {layoutDoc._layout_borderWidth = e.target.value; this._selectorWidth = Number(e.target.value); console.log(layoutDoc._layout_borderWidth)}}/>
+ <input className='width-selector' type="range" min={this._widthMinMax.min} max={this._widthMinMax.max} value={this._selectorWidth} id="myRange" onChange={e => runInAction(() => {doc.borderWidth = e.target.value; this._selectorWidth = Number(e.target.value)})}/>
<input className='max-min-selector' defaultValue={this._widthMinMax.max} onChange={e => this._widthMinMax.max = e.target.value}/>
</div>
</div>