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(); updatePath();
} }
widthWidget.callback = () => { widthWidget.callback = () => {
w = widthWidget.value w = widthWidget.value;
vis.width(w) if (w > 256) {
context.setSize([w + 45, context.size[1]]);
context.setSize([w + 45, context.size[1]]);
}
vis.width(w);
updatePath(); updatePath();
} }
heightWidget.callback = () => { heightWidget.callback = () => {
h = heightWidget.value h = heightWidget.value
vis.height(h) vis.height(h)