mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-08-04 05:18:19 +00:00
Fix rotation input (#472)
This commit is contained in:
parent
e39aa2a501
commit
9089a25199
1 changed files with 5 additions and 1 deletions
|
@ -268,7 +268,11 @@ export default defineComponent({
|
|||
return;
|
||||
}
|
||||
|
||||
const sanitized = clamp(newValue, this.min, this.max);
|
||||
// We cannot use the clamp function here as we need undifined values to lead to no clamp.
|
||||
|
||||
let sanitized = newValue;
|
||||
if (typeof this.min === "number") sanitized = Math.max(sanitized, this.min);
|
||||
if (typeof this.max === "number") sanitized = Math.min(sanitized, this.max);
|
||||
|
||||
this.setText(sanitized);
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue