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