]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Remove constraints option and check every options
authorJohann-S <johann.servoire@gmail.com>
Fri, 14 Apr 2017 10:05:54 +0000 (12:05 +0200)
committerJohann-S <johann.servoire@gmail.com>
Sun, 14 May 2017 09:41:19 +0000 (11:41 +0200)
js/src/dropdown.js
js/src/tooltip.js

index a2b5561c27203ce05d276df4013a03d6929e05e9..ad5ee8d9fcf0154d39134e273df739beb0055c41 100644 (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
+          }
         }
       })
 
index 2c22a7ed41207f9cf74f4a61c71282b7d1bac324..5f5e3d7bcbe1d33813e30fe6c29d88fc4ee7bc23 100644 (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
+            }
           }
         })