From: Johann-S Date: Fri, 14 Apr 2017 10:05:54 +0000 (+0200) Subject: Remove constraints option and check every options X-Git-Tag: v4.0.0-beta~166^2~54 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c21a2b0d92ca78b63bb9ec21ca0fbf9e9206a18e;p=thirdparty%2Fbootstrap.git Remove constraints option and check every options --- diff --git a/js/src/dropdown.js b/js/src/dropdown.js index a2b5561c27..ad5ee8d9fc 100644 --- a/js/src/dropdown.js +++ b/js/src/dropdown.js @@ -63,17 +63,13 @@ const Dropdown = (($) => { } const Default = { - animation : true, - trigger : 'click', placement : 'bottom', - offset : '0 0' + offset : {} } const DefaultType = { - animation : 'boolean', - trigger : 'string', placement : 'string', - offset : 'string' + offset : 'number' } @@ -145,8 +141,10 @@ const Dropdown = (($) => { this._popper = new Popper(this, context._menu, { placement : context._config.placement, - offsets : { - popper : context._config.offset + modifiers : { + offset : { + offset : this.config.offset + } } }) diff --git a/js/src/tooltip.js b/js/src/tooltip.js index 2c22a7ed41..5f5e3d7bcb 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -47,8 +47,7 @@ const Tooltip = (($) => { html : false, selector : false, placement : 'top', - offset : '0 0', - constraints : [], + offset : {}, container : false } @@ -61,8 +60,7 @@ const Tooltip = (($) => { html : 'boolean', selector : '(string|boolean)', placement : '(string|function)', - offset : 'string', - constraints : 'array', + offset : 'number', container : '(string|element|boolean)' } @@ -285,8 +283,10 @@ const Tooltip = (($) => { this._popper = new Popper(this.element, tip, { placement : attachment, - offsets : { - popper : this.config.offset + modifiers : { + offset : { + offset : this.config.offset + } } })