]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
force calculated width/heights back to context, for firefox compatibility 142/head
authorJon Rowe <hello@jonrowe.co.uk>
Thu, 27 Jun 2013 06:14:48 +0000 (16:14 +1000)
committerJon Rowe <hello@jonrowe.co.uk>
Mon, 26 Jan 2015 09:15:04 +0000 (20:15 +1100)
Chart.js

index fb8fb0c5416696b8b00fd0582abd3a53e05982f2..3c217c87d031380936b42e71303286e77cbdd693 100644 (file)
--- a/Chart.js
+++ b/Chart.js
 
                var width = this.width = computeDimension(context.canvas,'Width');
                var height = this.height = computeDimension(context.canvas,'Height');
+
+               // Firefox requires this to work correctly
+               context.canvas.width  = width;
+               context.canvas.height = 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);