mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-30 22:52: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
|
||||
if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {
|
||||
placement = PLACEMENT_TOP
|
||||
if (this._menu.classList.contains(CLASS_NAME_MENURIGHT)) {
|
||||
placement = PLACEMENT_TOPEND
|
||||
}
|
||||
placement = this._menu.classList.contains(CLASS_NAME_MENURIGHT) ?
|
||||
PLACEMENT_TOPEND :
|
||||
PLACEMENT_TOP
|
||||
} else if (parentDropdown.classList.contains(CLASS_NAME_DROPRIGHT)) {
|
||||
placement = PLACEMENT_RIGHT
|
||||
} else if (parentDropdown.classList.contains(CLASS_NAME_DROPLEFT)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user