1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-06 13:46:42 +02:00

Add horizontal collapse support

This commit is contained in:
Mark Otto
2021-06-14 23:25:11 +03:00
committed by Mark Otto
parent 8bc89b273d
commit 359ed099e5
5 changed files with 33 additions and 2 deletions

View File

@@ -50,6 +50,7 @@ const CLASS_NAME_SHOW = 'show'
const CLASS_NAME_COLLAPSE = 'collapse'
const CLASS_NAME_COLLAPSING = 'collapsing'
const CLASS_NAME_COLLAPSED = 'collapsed'
const CLASS_NAME_HORIZONTAL = 'collapse-horizontal'
const WIDTH = 'width'
const HEIGHT = 'height'
@@ -266,7 +267,7 @@ class Collapse extends BaseComponent {
}
_getDimension() {
return this._element.classList.contains(WIDTH) ? WIDTH : HEIGHT
return this._element.classList.contains(CLASS_NAME_HORIZONTAL) ? WIDTH : HEIGHT
}
_getParent() {