From b43e0c1027b02fce9dcd13641fbb4a38ac80a6fa Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Mon, 5 Sep 2011 18:31:17 +0200 Subject: [PATCH] SONAR-2074 Use Prototype #getWidth() method to access DIV width --- sonar-server/src/main/webapp/javascripts/protovis-sonar.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sonar-server/src/main/webapp/javascripts/protovis-sonar.js b/sonar-server/src/main/webapp/javascripts/protovis-sonar.js index bf6899af2dd..4f25c2d1920 100755 --- a/sonar-server/src/main/webapp/javascripts/protovis-sonar.js +++ b/sonar-server/src/main/webapp/javascripts/protovis-sonar.js @@ -42,13 +42,13 @@ SonarWidgets.Timeline.prototype.render = function() { var translations = this.wTranslations; var events = this.wEvents; - var widgetDiv = document.getElementById(this.wDivId); + var widgetDiv = $(this.wDivId); var footerFont = "10.5px Arial,Helvetica,sans-serif"; var show_y_axis = (trendData.size()==1) /* Sizing and scales. */ var headerHeight = 4 + Math.max(this.wMetrics.size(), events ? 2 : 1) * 18; - var w = widgetDiv.parentNode.offsetWidth - 60; + var w = widgetDiv.getOffsetParent().getWidth() - 60; var h = (this.wHeight == null ? 80 : this.wHeight) + headerHeight; var yMaxHeight = h-headerHeight; -- 2.39.5