diff options
author | Johann-S <johann.servoire@gmail.com> | 2017-09-07 13:47:43 +0300 |
---|---|---|
committer | Johann-S <johann.servoire@gmail.com> | 2017-09-07 14:51:25 +0300 |
commit | b822b5a17f87c62000ec3a058e3f2ccca8a10d3e (patch) | |
tree | db7a60bc105cf0c68ab9712cd9906c93f226068e /js | |
parent | 7983ba9473142c6844d6554a28e58ecbf14190da (diff) |
Remove placement attribute from our Dropdown plugin
Diffstat (limited to 'js')
-rw-r--r-- | js/src/dropdown.js | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/js/src/dropdown.js b/js/src/dropdown.js index adb54f0f21..f76f84ef0a 100644 --- a/js/src/dropdown.js +++ b/js/src/dropdown.js @@ -75,13 +75,11 @@ const Dropdown = (() => { } const Default = { - placement : AttachmentMap.BOTTOM, offset : 0, flip : true } const DefaultType = { - placement : 'string', offset : '(number|string)', flip : 'boolean' } @@ -203,11 +201,6 @@ const Dropdown = (() => { } _getConfig(config) { - const elementData = $(this._element).data() - if (typeof elementData.placement !== 'undefined') { - elementData.placement = AttachmentMap[elementData.placement.toUpperCase()] - } - config = $.extend( {}, this.constructor.Default, @@ -234,10 +227,10 @@ const Dropdown = (() => { _getPlacement() { const $parentDropdown = $(this._element).parent() - let placement = this._config.placement + let placement = AttachmentMap.BOTTOM // Handle dropup - if ($parentDropdown.hasClass(ClassName.DROPUP) || this._config.placement === AttachmentMap.TOP) { + if ($parentDropdown.hasClass(ClassName.DROPUP)) { placement = AttachmentMap.TOP if ($(this._menu).hasClass(ClassName.MENURIGHT)) { placement = AttachmentMap.TOPEND |