mirror of
https://github.com/chartjs/Chart.js.git
synced 2026-03-05 07:54:04 +01:00
Merge pull request #1911 from mathiask88/fixResize
Fixes resize() function
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user