forked from 0x2620/oxjs
make layer opaque on click
This commit is contained in:
parent
a8a797e669
commit
444fabdb39
3 changed files with 22 additions and 5 deletions
|
|
@ -1299,8 +1299,10 @@ requires
|
|||
.appendTo(that.$buttonsbar);
|
||||
});
|
||||
that.$buttons[0].focus();
|
||||
that.$layer = new Ox.Element()
|
||||
.addClass("OxLayer");
|
||||
that.$layer = new Ox.Element() // fixme: Layer widget, that would handle click?
|
||||
.addClass("OxLayer")
|
||||
.mousedown(mousedownLayer)
|
||||
.mouseup(mouseupLayer);
|
||||
|
||||
function center() {
|
||||
that.css({
|
||||
|
|
@ -1348,6 +1350,18 @@ requires
|
|||
|
||||
}
|
||||
|
||||
function mousedownLayer() {
|
||||
that.$layer.stop().animate({
|
||||
opacity: 0.5
|
||||
}, 100);
|
||||
}
|
||||
|
||||
function mouseupLayer() {
|
||||
that.$layer.stop().animate({
|
||||
opacity: 0
|
||||
}, 100);
|
||||
}
|
||||
|
||||
function reset() {
|
||||
that.width(self.options.width);
|
||||
that.height(self.options.height);
|
||||
|
|
@ -1432,7 +1446,7 @@ requires
|
|||
reset();
|
||||
that.css({
|
||||
opacity: 0
|
||||
}).appendTo(that.$layer).animate({
|
||||
}).appendTo($body).animate({
|
||||
opacity: 1
|
||||
}, 200);
|
||||
return that;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue