From: Heinrich Fenkart Date: Wed, 22 Oct 2014 19:38:34 +0000 (+0200) Subject: Follow-up to e2cfbd5: Fix spaces in placement calculation X-Git-Tag: v3.3.0~74 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95e0f48e3a2b2f002ef50f34bb1559f8765fe262;p=thirdparty%2Fbootstrap.git Follow-up to e2cfbd5: Fix spaces in placement calculation --- diff --git a/js/tooltip.js b/js/tooltip.js index 6dc6cf2e11..944586a2d0 100644 --- a/js/tooltip.js +++ b/js/tooltip.js @@ -191,10 +191,10 @@ 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