From b71e8cde1b7e94a9f16fd23b5b75783b6c541162 Mon Sep 17 00:00:00 2001 From: JonKazama-Hellion Date: Thu, 16 Apr 2026 21:45:35 +0200 Subject: [PATCH] fix(calculator): Auto-Resize via DOM statt nicht-existierendem WidgetManager.resize() Co-Authored-By: Claude Opus 4.6 --- src/js/calculator.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/js/calculator.js b/src/js/calculator.js index 09d3ca1..a323e1c 100644 --- a/src/js/calculator.js +++ b/src/js/calculator.js @@ -245,13 +245,16 @@ const Calculator = { // Auto-Resize für komplexe Modi const isComplex = name !== 'standard'; - if (isComplex) { - const state = WidgetManager.getState(this.WIDGET_ID); + if (isComplex && entry) { + const state = entry.state; if (state) { const newW = Math.max(state.width, 320); const newH = Math.max(state.height, 480); if (newW !== state.width || newH !== state.height) { - WidgetManager.resize(this.WIDGET_ID, newW, newH); + entry.el.style.width = newW + 'px'; + entry.el.style.height = newH + 'px'; + state.width = newW; + state.height = newH; } } }