fix(calculator): Auto-Resize via DOM statt nicht-existierendem WidgetManager.resize()

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-16 21:45:35 +02:00
parent 2487ac772f
commit b71e8cde1b
+6 -3
View File
@@ -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;
}
}
}