Skip to content

Commit 188ba43

Browse files
committed
fix: prevent info text overflow and remove stale computeSize in Vue nodes mode
Refactor infoY calculation to use shared canvasInfoY/maxVueInfoY values, clamping with Math.min so collapsed Vue extraControls does not draw past bottom padding. Remove obsolete computeSize override that forced a fixed widget height and conflicted with actual Vue widget sizing.
1 parent 38d472b commit 188ba43

2 files changed

Lines changed: 8 additions & 10 deletions

File tree

js/drawing/resolution_master_draw_methods.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,15 @@ export const drawingMethods = {
3535
this.draw2DCanvas(ctx, margin, currentY, node.size[0] - margin * 2, canvasHeight, canvasPadding);
3636
currentY += canvasHeight + this.getCanvasInfoGap();
3737

38+
const canvasInfoY = this.lastCanvasBounds
39+
? this.lastCanvasBounds.y + this.lastCanvasBounds.h + 18
40+
: currentY;
41+
const maxVueInfoY = node.size[1]
42+
- this.getVueCompatBottomOverlayClearance()
43+
- this.getManualBottomPadding();
3844
const infoY = this.isVueNodesMode() && this.collapsedSections.extraControls
39-
? node.size[1]
40-
- this.getVueCompatBottomOverlayClearance()
41-
- this.getManualBottomPadding()
42-
: this.lastCanvasBounds
43-
? this.lastCanvasBounds.y + this.lastCanvasBounds.h + 18
44-
: currentY;
45+
? Math.min(canvasInfoY, maxVueInfoY)
46+
: canvasInfoY;
4547
this.drawInfoText(ctx, infoY);
4648
currentY += 15 + spacing;
4749

js/node/resolution_master_node_lifecycle.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -383,10 +383,6 @@ export const nodeLifecycleMethods = {
383383
value: null,
384384
serialize: false,
385385
options: {},
386-
computeSize(width) {
387-
if (!self.isVueNodesMode()) return [0, -4];
388-
return [width, self.getVueCompatWidgetHeight()];
389-
},
390386
computeLayoutSize() {
391387
if (!self.isVueNodesMode()) {
392388
return { minWidth: 0, minHeight: 0, maxHeight: 0 };

0 commit comments

Comments
 (0)