]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Follow-up to e2cfbd5: Fix spaces in placement calculation
authorHeinrich Fenkart <hnrch02@gmail.com>
Wed, 22 Oct 2014 19:38:34 +0000 (21:38 +0200)
committerHeinrich Fenkart <hnrch02@gmail.com>
Wed, 22 Oct 2014 19:38:34 +0000 (21:38 +0200)
js/tooltip.js

index 6dc6cf2e11799dc5822ea28d5d7f8a07f89363f8..944586a2d07d0391bbb68ee59a0bea2c8d310c8f 100644 (file)
         var $container   = this.options.container ? $(this.options.container) : this.$element.parent()
         var containerDim = this.getPosition($container)
 
-        placement = placement == 'bottom' && pos.bottom   + actualHeight  > containerDim.bottom  ? 'top'    :
-                    placement == 'top'    && pos.top      - actualHeight  < containerDim.top     ? 'bottom' :
-                    placement == 'right'  && pos.right    + actualWidth   > containerDim.width   ? 'left'   :
-                    placement == 'left'   && pos.left     - actualWidth   < containerDim.left    ? 'right'  :
+        placement = placement == 'bottom' && pos.bottom + actualHeight > containerDim.bottom ? 'top'    :
+                    placement == 'top'    && pos.top    - actualHeight < containerDim.top    ? 'bottom' :
+                    placement == 'right'  && pos.right  + actualWidth  > containerDim.width  ? 'left'   :
+                    placement == 'left'   && pos.left   - actualWidth  < containerDim.left   ? 'right'  :
                     placement
 
         $tip