no-bug: Refactor _oppositeSide method using OPPOSITE_SIDES (gh-13613)

Signed-off-by: Guilherme Luiz Cella <151692400+guilherme-luiz-cella@users.noreply.github.com>
Co-authored-by: mr. m <91018726+mr-cheffy@users.noreply.github.com>
This commit is contained in:
Guilherme Luiz Cella
2026-05-12 06:57:56 -03:00
committed by GitHub
parent c406e79c5d
commit 0a7ee3fcf0

View File

@@ -969,19 +969,14 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature {
};
_oppositeSide(side) {
if (side === "top") {
return "bottom";
}
if (side === "bottom") {
return "top";
}
if (side === "left") {
return "right";
}
if (side === "right") {
return "left";
}
return undefined;
const OPPOSITE_SIDES = {
top: "bottom",
bottom: "top",
left: "right",
right: "left",
};
return OPPOSITE_SIDES[side];
}
calculateHoverSide(x, y, elementRect) {