From 189dbdd30c4351fccc88ff5e18ff19ff26412c05 Mon Sep 17 00:00:00 2001 From: "DESKTOP-TVBJISQ\\Primere" Date: Wed, 11 Mar 2026 12:02:54 +0100 Subject: [PATCH] V 2.0.0 - Auto config #4 - front-end --- front_end/model_concepts.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/front_end/model_concepts.js b/front_end/model_concepts.js index 136f487..884ffc4 100644 --- a/front_end/model_concepts.js +++ b/front_end/model_concepts.js @@ -114,9 +114,14 @@ function initializeSamplerNode(node) { }); saveBtn.serialize = false; - node.widgets.splice(node.widgets.indexOf(saveBtn), 1); - node.widgets.unshift(saveBtn); + saveBtn.options = saveBtn.options || {}; + saveBtn.options.serialize = false; + //node.widgets.splice(node.widgets.indexOf(saveBtn), 1); + // Do NOT unshift here. Button stays at the end so configure() can assign + // widget values by position without the button consuming index [0]. + // The unshift happens in onConfigure, after configure() has already run. applyPrimereButtonStyle(saveBtn); + node.__primereSaveBtn = saveBtn; const originalOnWidgetChanged = node.onWidgetChanged; node.onWidgetChanged = function (name, value, oldValue, widget) { @@ -132,6 +137,8 @@ function initializeSamplerNode(node) { node.conceptDisplayWidget.inputEl.readOnly = true; node.conceptDisplayWidget.inputEl.placeholder = "Runtime model type will appear here"; node.conceptDisplayWidget.serialize = false; + node.conceptDisplayWidget.options = node.conceptDisplayWidget.options || {}; + node.conceptDisplayWidget.options.serialize = false; const originalOnExecuted = node.onExecuted; node.onExecuted = function (message) {