Skip to content

Commit

Permalink
SplitLayout can be expanded fully.
Browse files Browse the repository at this point in the history
"Toggle orientation" checkbox enabled only while "show code" checkbox enabled.
  • Loading branch information
ngonzalezpazFC authored and javier-godoy committed Oct 19, 2020
1 parent 94ff0b1 commit 3ab9f27
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ public TwincolDemoView() {
layout.setSizeFull();
IFrame iframe = new IFrame();
iframe.getElement().setAttribute("frameborder", "0");
iframe.setMinHeight("0");
iframe.setMinWidth("0");
iframe.getElement().setAttribute("srcdoc", getSrcdoc(BOUND_SOURCE));
iframe.setSizeFull();
layout.addToSecondary(iframe);
Expand All @@ -75,7 +77,6 @@ public TwincolDemoView() {
} else {
layout.setOrientation(Orientation.VERTICAL);
}
layout.setSplitterPosition(50);
layout.getPrimaryComponent().getElement().setAttribute("style", "width: 100%; height: 100%");
iframe.setSizeFull();
});
Expand All @@ -85,9 +86,11 @@ public TwincolDemoView() {
codeCB.addValueChangeListener(cb -> {
if (cb.getValue()) {
layout.setSplitterPosition(50);
orientationCB.setEnabled(true);
}
else {
layout.setSplitterPosition(100);
orientationCB.setEnabled(false);
}
});
HorizontalLayout footer = new HorizontalLayout();
Expand Down

0 comments on commit 3ab9f27

Please sign in to comment.