Skip to content

Commit

Permalink
Remove constraints option and check every options
Browse files Browse the repository at this point in the history
  • Loading branch information
Johann-S committed Apr 14, 2017
1 parent 56d42a7 commit d857f86
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
14 changes: 6 additions & 8 deletions js/src/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}


Expand Down Expand Up @@ -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
}
}
})

Expand Down
12 changes: 6 additions & 6 deletions js/src/tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ const Tooltip = (($) => {
html : false,
selector : false,
placement : 'top',
offset : '0 0',
constraints : [],
offset : {},
container : false
}

Expand All @@ -61,8 +60,7 @@ const Tooltip = (($) => {
html : 'boolean',
selector : '(string|boolean)',
placement : '(string|function)',
offset : 'string',
constraints : 'array',
offset : 'number',
container : '(string|element|boolean)'
}

Expand Down Expand Up @@ -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
}
}
})

Expand Down

0 comments on commit d857f86

Please sign in to comment.