From 02a7889deb1748c370e830bc772a563394ff2887 Mon Sep 17 00:00:00 2001 From: Tom Joseph Date: Thu, 10 Dec 2015 05:39:39 -0500 Subject: [PATCH] Use SVGElement.getBoundingClientRect() instead of .offstHeight Fixes DOM API deprecation warning in Chrome. Please see: https://www.chromestatus.com/features/5724912467574784 This is an improved version of PR #1501. --- lib/timeline/component/DataAxis.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/timeline/component/DataAxis.js b/lib/timeline/component/DataAxis.js index 02593649..4a1291a3 100644 --- a/lib/timeline/component/DataAxis.js +++ b/lib/timeline/component/DataAxis.js @@ -59,7 +59,7 @@ function DataAxis (body, options, svg, linegraphOptions) { this.setOptions(options); this.width = Number(('' + this.options.width).replace("px","")); this.minWidth = this.width; - this.height = this.linegraphSVG.offsetHeight; + this.height = this.linegraphSVG.getBoundingClientRect().height; this.hidden = false; this.stepPixels = 25;