fix: use fixed dimensions to prevent massive overflow

- Set fixed width (360px) and height (620px) for container
- Remove percentage-based sizing that was causing overflow
- Use explicit pixel dimensions for widget element
- Ensure consistent sizing throughout
This commit is contained in:
Vito Sansevero
2025-08-04 14:14:32 -07:00
parent 59fe64d04f
commit 417e99b172
2 changed files with 6 additions and 5 deletions
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 16 KiB

+6 -5
View File
@@ -298,9 +298,8 @@ function createEnhancedUI(node) {
const container = document.createElement("div");
container.className = "xyz-controller-ui";
container.style.cssText = `
width: 100%;
height: 100%;
max-height: 620px;
width: 360px;
height: 620px;
overflow-y: auto;
overflow-x: hidden;
box-sizing: border-box;
@@ -691,12 +690,14 @@ app.registerExtension({
// Ensure widget has proper size
if (customWidget) {
customWidget.computeSize = () => [this.size[0] - 20, this.size[1] - 60];
customWidget.computeSize = () => [360, 620];
customWidget.size = customWidget.computeSize();
// Ensure the element has proper height constraint
if (customWidget.element) {
customWidget.element.style.maxHeight = (this.size[1] - 60) + 'px';
customWidget.element.style.width = '360px';
customWidget.element.style.height = '620px';
customWidget.element.style.maxHeight = '620px';
customWidget.element.style.overflow = 'hidden';
}
}