mirror of
https://github.com/discourse/discourse.git
synced 2025-04-28 01:44:34 +08:00
Change const to a variable
This commit is contained in:
parent
aa8b06aed2
commit
4896a7dec7
@ -96,7 +96,7 @@ export default Discourse.View.extend(CleansUp, {
|
|||||||
if (rtl) { // The site direction is rtl
|
if (rtl) { // The site direction is rtl
|
||||||
position.right = $(window).width() - position.left + 10;
|
position.right = $(window).width() - position.left + 10;
|
||||||
position.left = 'auto';
|
position.left = 'auto';
|
||||||
const overage = ($(window).width() - 50) - (position.right + width);
|
let overage = ($(window).width() - 50) - (position.right + width);
|
||||||
if (overage < 0) {
|
if (overage < 0) {
|
||||||
position.right += overage;
|
position.right += overage;
|
||||||
position.top += target.height() + 48;
|
position.top += target.height() + 48;
|
||||||
@ -104,7 +104,7 @@ export default Discourse.View.extend(CleansUp, {
|
|||||||
} else { // The site direction is ltr
|
} else { // The site direction is ltr
|
||||||
position.left += target.width() + 10;
|
position.left += target.width() + 10;
|
||||||
|
|
||||||
const overage = ($(window).width() - 50) - (position.left + width);
|
let overage = ($(window).width() - 50) - (position.left + width);
|
||||||
if (overage < 0) {
|
if (overage < 0) {
|
||||||
position.left += overage;
|
position.left += overage;
|
||||||
position.top += target.height() + 48;
|
position.top += target.height() + 48;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user