]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
move position of twipsy into getPosition so it can easily be extended for svg use
authorJacob Thornton <jacobthornton@gmail.com>
Sun, 25 Dec 2011 06:56:01 +0000 (22:56 -0800)
committerJacob Thornton <jacobthornton@gmail.com>
Sun, 25 Dec 2011 06:56:01 +0000 (22:56 -0800)
js/bootstrap-twipsy.js

index 21cf7d20b1c690a6d8a77349c2e55588f7a5ad0e..2651e3822640721471ace7a70100853c47431526 100644 (file)
           .css({ top: 0, left: 0, display: 'block' })
           .prependTo(inside ? this.$element : document.body)
 
-        pos = $.extend({}, (inside ? {top: 0, left: 0} : this.$element.offset()), {
-          width: this.$element[0].offsetWidth
-        , height: this.$element[0].offsetHeight
-        })
+        pos = this.getPosition(inside)
 
         actualWidth = $tip[0].offsetWidth
         actualHeight = $tip[0].offsetHeight
       return this.getTitle()
     }
 
+  , getPosition: function (inside) {
+      return $.extend({}, (inside ? {top: 0, left: 0} : this.$element.offset()), {
+        width: this.$element[0].offsetWidth
+      , height: this.$element[0].offsetHeight
+      })
+    }
+
   , getTitle: function () {
       var title
         , $e = this.$element