From 75deed4bee9df2a54503f82ab453c3c79501c089 Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Wed, 22 Jun 2016 17:38:20 +0200 Subject: [PATCH] [FIX] web_tour: border computation of the tip The border width was wrongly computed and was not used correctly in the reposition algo. --- addons/web_tour/static/src/js/tip.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/addons/web_tour/static/src/js/tip.js b/addons/web_tour/static/src/js/tip.js index fb5c7652416..5456dbb187c 100644 --- a/addons/web_tour/static/src/js/tip.js +++ b/addons/web_tour/static/src/js/tip.js @@ -42,7 +42,7 @@ return Widget.extend({ this.$tooltip_content = this.$(".o_tooltip_content"); this.init_width = this.$el.innerWidth(); this.init_height = this.$el.innerHeight(); - this.border_width = this.$el.outerWidth() - this.init_width; + this.border_width = (this.$el.outerWidth() - this.init_width)/2; this.content_width = this.$tooltip_content.outerWidth(true); this.content_height = this.$tooltip_content.outerHeight(true); this.$window = $(window); @@ -88,8 +88,6 @@ return Widget.extend({ }); var offset = this.$el.offset(); - offset.left += this.border_width; - offset.top += this.border_width; this.$tooltip_overlay.css({ top: -Math.min((this.info.position === "bottom" ? this.info.space : this.info.overlay.y), offset.top), right: -Math.min((this.info.position === "left" ? this.info.space : this.info.overlay.x), this.$window.width() - (offset.left + this.init_width)), @@ -197,4 +195,5 @@ return Widget.extend({ }); }, }); + });