From d2a44569b2b43fa9da5264ab06761d325a8c2483 Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Sat, 11 May 2024 13:15:54 +0300 Subject: [PATCH] Don't allow SplineEditor width to be too small --- web/js/spline_editor.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/web/js/spline_editor.js b/web/js/spline_editor.js index 48075c3..3eb78ca 100644 --- a/web/js/spline_editor.js +++ b/web/js/spline_editor.js @@ -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)