Commit 823d89db authored by Jacob Thornton's avatar Jacob Thornton

move position of twipsy into getPosition so it can easily be extended for svg use

parent 076370f3
......@@ -125,10 +125,7 @@
.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
......@@ -187,6 +184,13 @@
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment