mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-07 12:49:07 +02:00
Fixes resize() function
This commit is contained in:
parent
00913be944
commit
33303d8d8a
@ -90,12 +90,15 @@
|
||||
|
||||
var sizeChanged = this.chart.width !== newWidth || this.chart.height !== newHeight;
|
||||
|
||||
if (!sizeChanged)
|
||||
return this;
|
||||
|
||||
canvas.width = this.chart.width = newWidth;
|
||||
canvas.height = this.chart.height = newHeight;
|
||||
|
||||
helpers.retinaScale(this.chart);
|
||||
|
||||
if (!silent && sizeChanged) {
|
||||
if (!silent) {
|
||||
this.stop();
|
||||
this.update(this.options.responsiveAnimationDuration);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user