Skip to content

Commit 9fce8be

Browse files
committed
Fix UV editor size not updating correctly when attached to other panel
1 parent e86b36b commit 9fce8be

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

js/interface/panels.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -998,6 +998,14 @@ export class Panel extends EventSystem {
998998
if (this.node.clientHeight) {
999999
this.container.style.setProperty('--main-panel-height', this.node.clientHeight + 'px');
10001000
}
1001+
1002+
// Update child panels
1003+
for (let panel of this.getAttachedPanels()) {
1004+
panel.width = this.width;
1005+
panel.height = this.height;
1006+
if (panel.onResize) panel.onResize();
1007+
}
1008+
10011009
if (Panels[this.id] && this.onResize) this.onResize()
10021010
} else {
10031011
this.container.classList.add('hidden');

js/texturing/uv.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2523,7 +2523,7 @@ Interface.definePanels(function() {
25232523
if (Format.image_editor) {
25242524
this.height = Interface.preview.clientHeight - 38;
25252525

2526-
} else if (Panels.uv.slot.includes('_bar') && !UVEditor.panel.fixed_height) {
2526+
} else if (Panels.uv.getContainerPanel().slot.includes('_bar') && !UVEditor.panel.fixed_height) {
25272527
this.height = size;
25282528

25292529
} else {

0 commit comments

Comments
 (0)