From: Fabrice Bellingard Date: Mon, 5 Sep 2011 16:31:17 +0000 (+0200) Subject: SONAR-2074 Use Prototype #getWidth() method to access DIV width X-Git-Tag: 2.11^2~94 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b43e0c1027b02fce9dcd13641fbb4a38ac80a6fa;p=sonarqube.git SONAR-2074 Use Prototype #getWidth() method to access DIV width --- 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;