diff options
author | Gleb Mazovetskiy <glebm@google.com> | 2015-04-27 22:02:35 +0300 |
---|---|---|
committer | Gleb Mazovetskiy <glebm@google.com> | 2015-04-27 22:02:35 +0300 |
commit | b01ab4942233bd7316a0634472e1243b13fb9f46 (patch) | |
tree | 30c86edd764710f462aa967a485f3a3528ad6bdd /assets/javascripts/bootstrap.js | |
parent | 2579e3374f146d85ce517cc368fb54c9d198ecc8 (diff) |
rake convert
Diffstat (limited to 'assets/javascripts/bootstrap.js')
-rw-r--r-- | assets/javascripts/bootstrap.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/assets/javascripts/bootstrap.js b/assets/javascripts/bootstrap.js index d2e117e0..18d59bb1 100644 --- a/assets/javascripts/bootstrap.js +++ b/assets/javascripts/bootstrap.js @@ -1437,13 +1437,12 @@ if (typeof jQuery === 'undefined') { if (autoPlace) { var orgPlacement = placement - var $container = this.options.container ? $(this.options.container) : this.$element.parent() - var containerDim = this.getPosition($container) + var viewportDim = this.getPosition(this.$viewport) - 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 > viewportDim.bottom ? 'top' : + placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' : + placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' : + placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' : placement $tip |