diff --git a/static/js/jquery.tipsy.js b/static/js/jquery.tipsy.js index b0a807e..753300d 100644 --- a/static/js/jquery.tipsy.js +++ b/static/js/jquery.tipsy.js @@ -37,6 +37,12 @@ width: this.$element[0].offsetWidth, height: this.$element[0].offsetHeight }); + + // XXX: sometimes pos.height is zero. I do not know why and I dont care. + if(isNaN(pos.height)) + pos.height = 0; + if(isNaN(pos.width)) + pos.width = 0; var actualWidth = $tip[0].offsetWidth, actualHeight = $tip[0].offsetHeight, @@ -51,7 +57,7 @@ tp = {top: pos.top - actualHeight - this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2}; break; case 'e': - tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth - this.options.offset}; + //tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth - this.options.offset}; // XXX HACK: i want to set another offset so apparently I have to hardcode this into the code. obviously. tp = {top: pos.top + pos.height / 2 - actualHeight / 2 + this.options.offset, left: pos.left - actualWidth}; break;