Skip to content

Commit 9089a25

Browse files
0HyperCubeKeavon
authored andcommitted
Fix rotation input (#472)
1 parent e39aa2a commit 9089a25

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

frontend/src/components/widgets/inputs/NumberInput.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,11 @@ export default defineComponent({
268268
return;
269269
}
270270
271-
const sanitized = clamp(newValue, this.min, this.max);
271+
// We cannot use the clamp function here as we need undifined values to lead to no clamp.
272+
273+
let sanitized = newValue;
274+
if (typeof this.min === "number") sanitized = Math.max(sanitized, this.min);
275+
if (typeof this.max === "number") sanitized = Math.min(sanitized, this.max);
272276
273277
this.setText(sanitized);
274278
},

0 commit comments

Comments
 (0)