0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00

Remove constraints option and check every options

This commit is contained in:
Johann-S 2017-04-14 12:05:54 +02:00
parent 54a8ab4011
commit c21a2b0d92
2 changed files with 12 additions and 14 deletions

View File

@ -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
}
}
})

View File

@ -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
}
}
})