diff options
author | Fabrice Bellingard <bellingard@gmail.com> | 2011-09-05 18:31:17 +0200 |
---|---|---|
committer | Fabrice Bellingard <bellingard@gmail.com> | 2011-09-05 18:31:17 +0200 |
commit | b43e0c1027b02fce9dcd13641fbb4a38ac80a6fa (patch) | |
tree | 957780bdd7f07e65590fb764ab6d5267d276dcd3 | |
parent | c420194e347f8a70189638ed3e1ee4b0f3b46fa2 (diff) | |
download | sonarqube-b43e0c1027b02fce9dcd13641fbb4a38ac80a6fa.tar.gz sonarqube-b43e0c1027b02fce9dcd13641fbb4a38ac80a6fa.zip |
SONAR-2074 Use Prototype #getWidth() method to access DIV width
-rwxr-xr-x | sonar-server/src/main/webapp/javascripts/protovis-sonar.js | 4 |
1 files 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; |