From: Moshe Brevda Date: Mon, 16 Mar 2015 11:47:25 +0000 (+0200) Subject: Use default canvas size if one cannot be intelligently procured X-Git-Tag: v2.0-alpha~54^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F999%2Fhead;p=thirdparty%2FChart.js.git Use default canvas size if one cannot be intelligently procured --- diff --git a/src/Chart.Core.js b/src/Chart.Core.js index 5dccd2ef9..6fa0af762 100755 --- a/src/Chart.Core.js +++ b/src/Chart.Core.js @@ -37,8 +37,8 @@ } } - var width = this.width = computeDimension(context.canvas,'Width'); - var height = this.height = computeDimension(context.canvas,'Height'); + var width = this.width = computeDimension(context.canvas,'Width') || context.canvas.width; + var height = this.height = computeDimension(context.canvas,'Height') || context.canvas.height; // Firefox requires this to work correctly context.canvas.width = width;