From fd656d086dc4fc477407fc42129a832e065aeb6b Mon Sep 17 00:00:00 2001 From: KPal <48248865+kpal81xd@users.noreply.github.com> Date: Fri, 23 Feb 2024 13:54:34 +0000 Subject: [PATCH] enabled history combine on slider mouse events for vector input binding (#348) --- src/components/VectorInput/index.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/components/VectorInput/index.ts b/src/components/VectorInput/index.ts index c136027d..5d478d15 100644 --- a/src/components/VectorInput/index.ts +++ b/src/components/VectorInput/index.ts @@ -73,6 +73,10 @@ class VectorInput extends Element implements IBindable, IFocusable, IPlaceholder for (let i = 0; i < this._inputs.length; i++) { this._inputs[i].class.add(pcuiClass.FOCUS); } + + if (this.binding) { + this.binding.historyCombine = true; + } } }); input.on('slider:mouseup', () => { @@ -81,6 +85,11 @@ class VectorInput extends Element implements IBindable, IFocusable, IPlaceholder for (let i = 0; i < this._inputs.length; i++) { this._inputs[i].class.remove(pcuiClass.FOCUS); } + input.blur(); + + if (this.binding) { + this.binding.historyCombine = false; + } }); input.on('change', () => { this._onInputChange(input);