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:
@@ -245,13 +245,16 @@ const Calculator = {
|
|||||||
|
|
||||||
// Auto-Resize für komplexe Modi
|
// Auto-Resize für komplexe Modi
|
||||||
const isComplex = name !== 'standard';
|
const isComplex = name !== 'standard';
|
||||||
if (isComplex) {
|
if (isComplex && entry) {
|
||||||
const state = WidgetManager.getState(this.WIDGET_ID);
|
const state = entry.state;
|
||||||
if (state) {
|
if (state) {
|
||||||
const newW = Math.max(state.width, 320);
|
const newW = Math.max(state.width, 320);
|
||||||
const newH = Math.max(state.height, 480);
|
const newH = Math.max(state.height, 480);
|
||||||
if (newW !== state.width || newH !== state.height) {
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user