Skip to content

Commit

Permalink
Merge pull request #828 from TheChilledBuffalo/typos
Browse files Browse the repository at this point in the history
[FB] Code  | Fix typos
  • Loading branch information
creeper-0910 authored Feb 1, 2024
2 parents 175c40e + 89ad6f8 commit 689bbc1
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions browser/base/content/tabbrowser-tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -519,10 +519,10 @@
// dragend such that the mouse appears to have the same position
// relative to the corner of the dragged tab.

const VertitalEnabled = Services.prefs.getIntPref("floorp.tabbar.style") == 2;
const verticalEnabled = Services.prefs.getIntPref("floorp.tabbar.style") == 2;
//replace clientX/Y with screenX/Y to fix dragging tabs between windows
function getClientElementPosition(ele) {
if(!VertitalEnabled) {
if(!verticalEnabled) {
return ele.getBoundingClientRect().left;
}
return ele.getBoundingClientRect().top;
Expand Down Expand Up @@ -648,17 +648,17 @@
} else {
let newIndex = this._getDropIndex(event);
let children = this.allTabs;
const VertitalEnabled = Services.prefs.getIntPref("floorp.tabbar.style") == 2;
const verticalEnabled = Services.prefs.getIntPref("floorp.tabbar.style") == 2;
if (newIndex == children.length) {
let tabRect = this._getVisibleTabs().at(-1).getBoundingClientRect();
if (RTL_UI && !VertitalEnabled) {
if (RTL_UI && !verticalEnabled) {
newMargin = rect.right - tabRect.left;
} else {
newMargin = tabRect.right - rect.left;
}
} else {
let tabRect = children[newIndex].getBoundingClientRect();
if (RTL_UI && !VertitalEnabled) {
if (RTL_UI && !verticalEnabled) {
newMargin = rect.right - tabRect.right;
} else {
newMargin = tabRect.left - rect.left;
Expand Down Expand Up @@ -1535,13 +1535,13 @@
}
}

const VertitalEnabled = Services.prefs.getIntPref("floorp.tabbar.style") == 2;
const verticalEnabled = Services.prefs.getIntPref("floorp.tabbar.style") == 2;

// horizontal tabs & vertical tabs have different animation properties
const animLastScreen = VertitalEnabled ? "animLastScreenY" : "animLastScreenX";
const screen = VertitalEnabled ? "screenY" : "screenX";
const screenOrientation = VertitalEnabled ? "height" : "width";
const translate = VertitalEnabled ? "translateY" : "translateX";
const animLastScreen = verticalEnabled ? "animLastScreenY" : "animLastScreenX";
const screen = verticalEnabled ? "screenY" : "screenX";
const screenOrientation = verticalEnabled ? "height" : "width";
const translate = verticalEnabled ? "translateY" : "translateX";

if (!(animLastScreen in draggedTab._dragData)) {
draggedTab._dragData[animLastScreen] = draggedTab._dragData[screen];
Expand All @@ -1562,7 +1562,7 @@
pinned ? numPinned : undefined
);

if (RTL_UI && !VertitalEnabled) {
if (RTL_UI && !verticalEnabled) {
tabs.reverse();
// Copy moving tabs array to avoid infinite reversing.
movingTabs = [...movingTabs].reverse();
Expand Down

0 comments on commit 689bbc1

Please sign in to comment.