|
@@ -37,6 +37,12 @@
|
37
|
37
|
width: this.$element[0].offsetWidth,
|
38
|
38
|
height: this.$element[0].offsetHeight
|
39
|
39
|
});
|
|
40
|
+
|
|
41
|
+ // XXX: sometimes pos.height is zero. I do not know why and I dont care.
|
|
42
|
+ if(isNaN(pos.height))
|
|
43
|
+ pos.height = 0;
|
|
44
|
+ if(isNaN(pos.width))
|
|
45
|
+ pos.width = 0;
|
40
|
46
|
|
41
|
47
|
var actualWidth = $tip[0].offsetWidth,
|
42
|
48
|
actualHeight = $tip[0].offsetHeight,
|
|
@@ -51,7 +57,7 @@
|
51
|
57
|
tp = {top: pos.top - actualHeight - this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2};
|
52
|
58
|
break;
|
53
|
59
|
case 'e':
|
54
|
|
- tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth - this.options.offset};
|
|
60
|
+ //tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth - this.options.offset};
|
55
|
61
|
// XXX HACK: i want to set another offset so apparently I have to hardcode this into the code. obviously.
|
56
|
62
|
tp = {top: pos.top + pos.height / 2 - actualHeight / 2 + this.options.offset, left: pos.left - actualWidth};
|
57
|
63
|
break;
|