diff options
| author | sharkiecodes <lanyi_stroud@brown.edu> | 2025-07-22 12:35:43 -0400 |
|---|---|---|
| committer | sharkiecodes <lanyi_stroud@brown.edu> | 2025-07-22 12:35:43 -0400 |
| commit | d31a740378e8d4fd58ec329ba83dd20d28bfe5b4 (patch) | |
| tree | b46103d4f9fd2b04ccfc25023e1cb0156168f412 /src/client/views/PropertiesView.tsx | |
| parent | 62f9b89dad334d3d6405f5286e66b253090a82c7 (diff) | |
| parent | 3f489c64d9e55d452c255f8e2c10b0d754883dbb (diff) | |
Merge branch 'master' into lanyi-expanded-agent-paper-main
Diffstat (limited to 'src/client/views/PropertiesView.tsx')
| -rw-r--r-- | src/client/views/PropertiesView.tsx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx index 06463b2a2..f7c4b464c 100644 --- a/src/client/views/PropertiesView.tsx +++ b/src/client/views/PropertiesView.tsx @@ -58,7 +58,6 @@ interface PropertiesViewProps { export class PropertiesView extends ObservableReactComponent<PropertiesViewProps> { private _widthUndo?: UndoManager.Batch; - // eslint-disable-next-line no-use-before-define public static Instance: PropertiesView; constructor(props: PropertiesViewProps) { super(props); @@ -1187,6 +1186,7 @@ export class PropertiesView extends ObservableReactComponent<PropertiesViewProps setFinalNumber = () => { this._sliderKey = ''; this._sliderBatch?.end(); + this._sliderBatch = undefined; }; getNumber = (label: string, unit: string, min: number, max: number, number: number, setNumber: (val: number) => void, autorange?: number, autorangeMinVal?: number) => { @@ -1198,7 +1198,6 @@ export class PropertiesView extends ObservableReactComponent<PropertiesViewProps key={key} onPointerDown={() => { this._sliderKey = key; - this._sliderBatch = UndoManager.StartBatch('slider ' + label); }} multithumb={false} color={this.color} @@ -1211,7 +1210,10 @@ export class PropertiesView extends ObservableReactComponent<PropertiesViewProps unit={unit} decimals={1} setFinalNumber={this.setFinalNumber} - setNumber={setNumber} + setNumber={e => { + if (!this._sliderBatch) this._sliderBatch = UndoManager.StartBatch('slider ' + label); + setNumber(e); + }} fillWidth /> </div> |
