1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-06 14:20:56 +00:00

Chat input is in now, and a ton of other stuff. Why are my commits to trash?

This commit is contained in:
SirStendec 2015-07-06 00:09:21 -04:00
parent 6a62804ec1
commit a7e7f7498d
18 changed files with 1416 additions and 165 deletions

View file

@ -361,6 +361,16 @@ FFZ.prototype.setup_mod_card = function() {
}
}
// Reposition the menu if it's off-screen.
var el_bound = el.getBoundingClientRect(),
body_bound = document.body.getBoundingClientRect();
if ( el_bound.bottom > body_bound.bottom ) {
var offset = el_bound.bottom - body_bound.bottom;
if ( el_bound.top - offset > body_bound.top )
el.style.top = (el_bound.top - offset) + "px";
}
// Focus the Element
this.$().draggable({
start: function() {