tweak positioning when it has no room to right
This commit is contained in:
parent
e3bfc2e447
commit
246f77c98d
|
@ -73,8 +73,8 @@ export default Discourse.View.extend(CleansUp, {
|
||||||
|
|
||||||
var overage = ($(window).width() - 50) - (position.left + width);
|
var overage = ($(window).width() - 50) - (position.left + width);
|
||||||
if (overage < 0) {
|
if (overage < 0) {
|
||||||
position.left += overage;
|
position.left -= (width/2) - 10;
|
||||||
position.top += target.height() + 5;
|
position.top += target.height() + 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
position.top -= $('#main-outlet').offset().top;
|
position.top -= $('#main-outlet').offset().top;
|
||||||
|
|
Loading…
Reference in New Issue