1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-13 17:14:04 +02: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 = { const Default = {
animation : true,
trigger : 'click',
placement : 'bottom', placement : 'bottom',
offset : '0 0' offset : {}
} }
const DefaultType = { const DefaultType = {
animation : 'boolean',
trigger : 'string',
placement : 'string', placement : 'string',
offset : 'string' offset : 'number'
} }
@@ -145,8 +141,10 @@ const Dropdown = (($) => {
this._popper = new Popper(this, context._menu, { this._popper = new Popper(this, context._menu, {
placement : context._config.placement, placement : context._config.placement,
offsets : { modifiers : {
popper : context._config.offset offset : {
offset : this.config.offset
}
} }
}) })

View File

@@ -47,8 +47,7 @@ const Tooltip = (($) => {
html : false, html : false,
selector : false, selector : false,
placement : 'top', placement : 'top',
offset : '0 0', offset : {},
constraints : [],
container : false container : false
} }
@@ -61,8 +60,7 @@ const Tooltip = (($) => {
html : 'boolean', html : 'boolean',
selector : '(string|boolean)', selector : '(string|boolean)',
placement : '(string|function)', placement : '(string|function)',
offset : 'string', offset : 'number',
constraints : 'array',
container : '(string|element|boolean)' container : '(string|element|boolean)'
} }
@@ -285,8 +283,10 @@ const Tooltip = (($) => {
this._popper = new Popper(this.element, tip, { this._popper = new Popper(this.element, tip, {
placement : attachment, placement : attachment,
offsets : { modifiers : {
popper : this.config.offset offset : {
offset : this.config.offset
}
} }
}) })