Skip to content

Commit f99459d

Browse files
mlopezFCjavier-godoy
authored andcommitted
feat: add support for right drawer alignment
1 parent 2633658 commit f99459d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/main/java/com/flowingcode/addons/applayout/AppLayout.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ private AppLayout(Component menuHeader, String aTitle, Image aLogo) {
7575
Div title = new Div();
7676
title.setText(aTitle);
7777
addToTitleSection(title);
78+
setDrawerRightAlignment(false);
7879
}
7980

8081
public void addToTitleSection(Component component) {
@@ -191,4 +192,12 @@ public void setDrawerBelowHeader(boolean drawerBelowHeader) {
191192
this.getElement().setAttribute("drawerBelowHeader", drawerBelowHeader);
192193
}
193194

195+
/**
196+
* Sets the drawerBelowHeader attribute so the drawer will be show below
197+
* the header of the applayout
198+
* @param drawerBelowHeader
199+
*/
200+
public void setDrawerRightAlignment(boolean drawerRightAlignment) {
201+
this.getElement().setAttribute("drawerAlign", drawerRightAlignment?"right":"left");
202+
}
194203
}

0 commit comments

Comments
 (0)