@@ -125,6 +127,14 @@
* @default 10000
*/
zIndex: 10000,
+
+ /**
+ * Set if the overlay of screen should be used when the menu is opened.
+ * @attribute overlay
+ * @type boolean
+ * @default false
+ */
+ overlay: false,
ready: function() {
this.calculateTransitionEffects.apply(this);
@@ -134,7 +144,9 @@
},
overlayOpenedChanged: function() {
- this.opened = this.$.overlay.opened;
+ if(this.overlay){
+ this.opened = this.$.overlay.opened;
+ }
},
/**
@@ -157,16 +169,20 @@
return;
for (l in backdrops) {
- if (backdrops[l] != this.$.overlay.scrim) {
- // add core-opened to other backdrop for workaround
- backdrops[l].classList.add('core-opened')
-
- // remove overlay of fab-menu.
- this.$.overlay.scrim.remove();
-
- // just do this at first backdrop.
- return;
- }
+ if(this.overlay) {
+ if (backdrops[l] != this.$.overlay.scrim) {
+ // add core-opened to other backdrop for workaround
+ backdrops[l].classList.add('core-opened')
+
+ // remove overlay of fab-menu.
+
+ this.$.overlay.scrim.remove();
+
+
+ // just do this at first backdrop.
+ return;
+ }
+ }
}
}
@@ -190,8 +206,10 @@
this.opened = true;
this.$.trigger.icon = this.closeIcon;
this.$.trigger.setAttribute("activate", "");
-
- this.$.overlay.open();
+
+ if(this.overlay){
+ this.$.overlay.open();
+ }
},
/**
@@ -204,7 +222,9 @@
this.$.trigger.icon = this.icon;
this.$.trigger.removeAttribute("activate");
- this.$.overlay.close();
+ if(this.overlay){
+ this.$.overlay.close();
+ }
},
update: function() {