Skip to content

Commit

Permalink
enabled history combine on slider mouse events for vector input bindi…
Browse files Browse the repository at this point in the history
…ng (#348)
  • Loading branch information
kpal81xd authored Feb 23, 2024
1 parent ec11528 commit fd656d0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/components/VectorInput/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand All @@ -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);
Expand Down

0 comments on commit fd656d0

Please sign in to comment.