Don't allow SplineEditor width to be too small

This commit is contained in:
kijai 2024-05-11 13:15:54 +03:00
parent bee351960d
commit d2a44569b2

View File

@ -390,11 +390,15 @@ function createSplineEditor(context, reset=false) {
updatePath();
}
widthWidget.callback = () => {
w = widthWidget.value
vis.width(w)
context.setSize([w + 45, context.size[1]]);
w = widthWidget.value;
if (w > 256) {
context.setSize([w + 45, context.size[1]]);
}
vis.width(w);
updatePath();
}
}
heightWidget.callback = () => {
h = heightWidget.value
vis.height(h)