Browse Source

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.
codeClimate
Tom Joseph 8 years ago
parent
commit
02a7889deb
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      lib/timeline/component/DataAxis.js

+ 1
- 1
lib/timeline/component/DataAxis.js View File

@ -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;

Loading…
Cancel
Save