added gridstack

This commit is contained in:
Pit Friedrich
2026-07-25 21:56:47 +02:00
parent c2d29f0635
commit bcf604b7c5
7 changed files with 73 additions and 7 deletions
@@ -27,7 +27,11 @@ public class GridStackItem extends Div {
getElement().setAttribute("gs-h", String.valueOf(h));
this.content.addClassName("grid-stack-item-content");
add(this.content);
// Attach the wrapper div directly through the element API — calling
// the overridden add(Component...) below would route it through
// `content.add(...)`, making the wrapper try to add itself as its
// own child.
getElement().appendChild(this.content.getElement());
this.content.add(content);
}
@@ -80,7 +84,7 @@ public class GridStackItem extends Div {
}
/** Snapshot of a widget's grid placement, as reported by the client after a
* drag/resize (see {@link GridStackLayout#onLayoutChange(String)}). */
* drag/resize. */
public record Position(String id, int x, int y, int w, int h) {
}
}