]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Fixed a bug with calculating the canvas width and height 2220/head
authorTommy Graves <tommy@infinitry.net>
Tue, 5 Apr 2016 12:28:46 +0000 (08:28 -0400)
committerTommy Graves <tommy@infinitry.net>
Tue, 5 Apr 2016 12:28:46 +0000 (08:28 -0400)
A previous commit removing a workaround for an old Firefox bug left part
of that workaround in, and it was preventing the expected behavior of
the canvas size being equal to the offsetWidth and offsetHeight of the
canvas prior to instantiation of Chart.JS

src/Chart.Core.js

index 61a0646c4bc8e79a652db18252acc797cc9196c2..4dc62867ffd030b134099155415205acb97ccd1f 100755 (executable)
@@ -40,8 +40,6 @@
                var width = this.width = computeDimension(context.canvas,'Width') || context.canvas.width;
                var height = this.height = computeDimension(context.canvas,'Height') || context.canvas.height;
 
-               width = this.width = context.canvas.width;
-               height = this.height = context.canvas.height;
                this.aspectRatio = this.width / this.height;
                //High pixel density displays - multiply the size of the canvas height/width by the device pixel ratio, then scale.
                helpers.retinaScale(this);