Permalink
Browse files

Added new zIndex option

  • Loading branch information...
1 parent a16d366 commit c27f6a6a27d4302ac008383d6f5759472b38e64a @darkwing committed Dec 20, 2009
Showing with 6 additions and 4 deletions.
  1. +1 −0 Docs/Overlay.md
  2. +5 −4 Source/Overlay.js
View
@@ -25,6 +25,7 @@ Overlay Method: constructor {#Overlay:constructor}
* color - (*string*, defaults to '#000') - The base background color of the overlay. Keep in mind the actual screen color will change with the opacity level.
* duration - (*integer*, defaults to 500) - The open/close duration of the overlay.
* opacity - (*float*, defaults to 0.5) - The destination opacity level of the overlay.
+* zIndex - (*integer*, defaults to 5000) - The z-index of the overlay.
### Events:
View
@@ -23,7 +23,8 @@ var Overlay = new Class({
id: 'overlay',
color: '#000',
duration: 500,
- opacity: 0.5/*,
+ opacity: 0.5,
+ zIndex: 5000/*,
onClick: $empty,
onClose: $empty,
onHide: $empty,
@@ -43,7 +44,7 @@ var Overlay = new Class({
background: this.options.color,
left: 0,
top: 0,
- 'z-index': 5000
+ 'z-index': this.options.zIndex
},
events: {
click: function() {
@@ -68,11 +69,11 @@ var Overlay = new Class({
});
},
open: function() {
- this.fireEvent('open')
+ this.fireEvent('open');
this.tween.start(this.options.opacity);
},
close: function() {
- this.fireEvent('close')
+ this.fireEvent('close');
this.tween.start(0);
}
});

0 comments on commit c27f6a6

Please sign in to comment.