mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-07 04:54:24 +01:00
dropdown.js: simplify code (#32055)
This commit is contained in:
parent
ccac6a6219
commit
b864973a94
@ -278,10 +278,9 @@ class Dropdown {
|
|||||||
|
|
||||||
// Handle dropup
|
// Handle dropup
|
||||||
if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {
|
if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {
|
||||||
placement = PLACEMENT_TOP
|
placement = this._menu.classList.contains(CLASS_NAME_MENURIGHT) ?
|
||||||
if (this._menu.classList.contains(CLASS_NAME_MENURIGHT)) {
|
PLACEMENT_TOPEND :
|
||||||
placement = PLACEMENT_TOPEND
|
PLACEMENT_TOP
|
||||||
}
|
|
||||||
} else if (parentDropdown.classList.contains(CLASS_NAME_DROPRIGHT)) {
|
} else if (parentDropdown.classList.contains(CLASS_NAME_DROPRIGHT)) {
|
||||||
placement = PLACEMENT_RIGHT
|
placement = PLACEMENT_RIGHT
|
||||||
} else if (parentDropdown.classList.contains(CLASS_NAME_DROPLEFT)) {
|
} else if (parentDropdown.classList.contains(CLASS_NAME_DROPLEFT)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user