File tree Expand file tree Collapse file tree
domino-ui/src/main/java/org/dominokit/domino/ui/splitpanel Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717
1818import static org .dominokit .domino .ui .utils .Domino .*;
1919
20+ import org .dominokit .domino .ui .utils .Unit ;
21+
2022/**
2123 * Represents a horizontal split panel which contains two panels separated by a horizontal splitter.
2224 *
@@ -65,6 +67,7 @@ protected double getPanelSize(SplitPanel panel) {
6567 protected void setPanelSize (SplitPanel panel , String size ) {
6668 panel .style ().setWidth (size );
6769 panel .setCssProperty ("--dui-split-panel-dynamic-size" , size );
70+ panel .onPanelResize (Unit .px .parse (size ).doubleValue ());
6871 }
6972
7073 /**
Original file line number Diff line number Diff line change @@ -246,9 +246,8 @@ public SplitPanel setLast(boolean last) {
246246 * @param pixels the new size of the panel in pixels
247247 * @param percent the new size of the panel in percentage
248248 */
249- void onResize (double pixels , double percent ) {
250- resizeListeners .forEach (
251- resizeListener -> resizeListener .onResize (SplitPanel .this , pixels , percent ));
249+ void onPanelResize (double pixels ) {
250+ resizeListeners .forEach (resizeListener -> resizeListener .onResize (SplitPanel .this , pixels ));
252251 }
253252
254253 /**
@@ -272,6 +271,6 @@ public interface ResizeListener {
272271 * @param pixels the size of the panel in pixels after resizing
273272 * @param percent the size of the panel in percentage after resizing
274273 */
275- void onResize (SplitPanel panel , double pixels , double percent );
274+ void onResize (SplitPanel panel , double pixels );
276275 }
277276}
Original file line number Diff line number Diff line change 1717
1818import static org .dominokit .domino .ui .utils .Domino .*;
1919
20+ import org .dominokit .domino .ui .utils .Unit ;
21+
2022/**
2123 * Represents a vertical split panel which contains two panels separated by a vertical splitter.
2224 *
@@ -65,6 +67,7 @@ protected double getPanelSize(SplitPanel panel) {
6567 protected void setPanelSize (SplitPanel panel , String size ) {
6668 panel .style ().setHeight (size );
6769 panel .setCssProperty ("--dui-split-panel-dynamic-size" , size );
70+ panel .onPanelResize (Unit .px .parse (size ).doubleValue ());
6871 }
6972
7073 /**
You can’t perform that action at this time.
0 commit comments