|
|
|
@ -154,22 +154,22 @@ BI.Drawer = BI.inherit(BI.Widget, {
|
|
|
|
|
switch (o.placement) { |
|
|
|
|
case "right": |
|
|
|
|
self.element.css({ |
|
|
|
|
transform: "translateX(-" + size.width + "px)" |
|
|
|
|
left: "calc(100% - " + size.width + "px)" |
|
|
|
|
}); |
|
|
|
|
break; |
|
|
|
|
case "left": |
|
|
|
|
self.element.css({ |
|
|
|
|
transform: "translateX(" + size.width + "px)" |
|
|
|
|
right: "calc(100% - " + size.width + "px)" |
|
|
|
|
}); |
|
|
|
|
break; |
|
|
|
|
case "top": |
|
|
|
|
self.element.css({ |
|
|
|
|
transform: "translateY(" + size.height + "px)" |
|
|
|
|
bottom: "calc(100% - " + size.height + "px)" |
|
|
|
|
}); |
|
|
|
|
break; |
|
|
|
|
case "bottom": |
|
|
|
|
self.element.css({ |
|
|
|
|
transform: "translateY(-" + size.height + "px)" |
|
|
|
|
top: "calc(100% - " + size.height + "px)" |
|
|
|
|
}); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
@ -180,17 +180,26 @@ BI.Drawer = BI.inherit(BI.Widget, {
|
|
|
|
|
hide: function (callback) { |
|
|
|
|
var self = this, o = this.options; |
|
|
|
|
requestAnimationFrame(function () { |
|
|
|
|
var size = self._getSuitableSize(); |
|
|
|
|
switch (o.placement) { |
|
|
|
|
case "right": |
|
|
|
|
self.element.css({ |
|
|
|
|
left: "100%" |
|
|
|
|
}); |
|
|
|
|
break; |
|
|
|
|
case "left": |
|
|
|
|
self.element.css({ |
|
|
|
|
transform: "translateX(0px)" |
|
|
|
|
right: "100%" |
|
|
|
|
}); |
|
|
|
|
break; |
|
|
|
|
case "top": |
|
|
|
|
self.element.css({ |
|
|
|
|
bottom: "100%" |
|
|
|
|
}); |
|
|
|
|
break; |
|
|
|
|
case "bottom": |
|
|
|
|
self.element.css({ |
|
|
|
|
transform: "translateY(0px)" |
|
|
|
|
top: "100%" |
|
|
|
|
}); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
@ -213,7 +222,7 @@ BI.Drawer = BI.inherit(BI.Widget, {
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
setZindex: function (zindex) { |
|
|
|
|
this.element.css({"z-index": zindex}); |
|
|
|
|
this.element.css({ "z-index": zindex }); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
destroyed: function () { |
|
|
|
|