From: Jukka Kurkela Date: Sun, 27 Oct 2019 22:28:47 +0000 (+0200) Subject: Remove deprecated code from animations and core (#6624) X-Git-Tag: v3.0.0-alpha~292 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d6ba91f7323773cb7dddbac56f73214ff2808830;p=thirdparty%2FChart.js.git Remove deprecated code from animations and core (#6624) --- diff --git a/src/core/core.animation.js b/src/core/core.animation.js index 892eb1cd7..236e923a1 100644 --- a/src/core/core.animation.js +++ b/src/core/core.animation.js @@ -14,32 +14,3 @@ var exports = Element.extend({ }); module.exports = exports; - -// DEPRECATIONS - -/** - * Provided for backward compatibility, use Chart.Animation instead - * @prop Chart.Animation#animationObject - * @deprecated since version 2.6.0 - * @todo remove at version 3 - */ -Object.defineProperty(exports.prototype, 'animationObject', { - get: function() { - return this; - } -}); - -/** - * Provided for backward compatibility, use Chart.Animation#chart instead - * @prop Chart.Animation#chartInstance - * @deprecated since version 2.6.0 - * @todo remove at version 3 - */ -Object.defineProperty(exports.prototype, 'chartInstance', { - get: function() { - return this.chart; - }, - set: function(value) { - this.chart = value; - } -}); diff --git a/src/core/core.controller.js b/src/core/core.controller.js index 27884bcf0..8827c78df 100644 --- a/src/core/core.controller.js +++ b/src/core/core.controller.js @@ -192,17 +192,6 @@ helpers.extend(Chart.prototype, /** @lends Chart */ { me._bufferedRender = false; me._layers = []; - /** - * Provided for backward compatibility, Chart and Chart.Controller have been merged, - * the "instance" still need to be defined since it might be called from plugins. - * @prop Chart#chart - * @deprecated since version 2.6.0 - * @todo remove at version 3 - * @private - */ - me.chart = me; - me.controller = me; // chart.chart.controller #inception - // Add the chart instance to the global namespace Chart.instances[me.id] = me; @@ -563,14 +552,6 @@ helpers.extend(Chart.prototype, /** @lends Chart */ { item._idx = index; }); - /** - * Provided for backward compatibility, use `afterLayout` instead. - * @method IPlugin#afterScaleUpdate - * @deprecated since version 2.5.0 - * @todo remove at version 3 - * @private - */ - plugins.notify(me, 'afterScaleUpdate'); plugins.notify(me, 'afterLayout'); }, @@ -1110,41 +1091,3 @@ helpers.extend(Chart.prototype, /** @lends Chart */ { Chart.instances = {}; module.exports = Chart; - -// DEPRECATIONS - -/** - * Provided for backward compatibility, use Chart instead. - * @class Chart.Controller - * @deprecated since version 2.6 - * @todo remove at version 3 - * @private - */ -Chart.Controller = Chart; - -/** - * Provided for backward compatibility, not available anymore. - * @namespace Chart - * @deprecated since version 2.8 - * @todo remove at version 3 - * @private - */ -Chart.types = {}; - -/** - * Provided for backward compatibility, not available anymore. - * @namespace Chart.helpers.configMerge - * @deprecated since version 2.8.0 - * @todo remove at version 3 - * @private - */ -helpers.configMerge = mergeConfig; - -/** - * Provided for backward compatibility, not available anymore. - * @namespace Chart.helpers.scaleMerge - * @deprecated since version 2.8.0 - * @todo remove at version 3 - * @private - */ -helpers.scaleMerge = mergeScaleConfig; diff --git a/test/specs/core.tooltip.tests.js b/test/specs/core.tooltip.tests.js index 737b50c78..bda878f85 100755 --- a/test/specs/core.tooltip.tests.js +++ b/test/specs/core.tooltip.tests.js @@ -949,7 +949,7 @@ describe('Core.Tooltip', function() { var meta = chart.getDatasetMeta(0); var firstPoint = meta.data[1]; - var node = chart.chart.canvas; + var node = chart.canvas; var rect = node.getBoundingClientRect(); var firstEvent = new MouseEvent('mousemove', { diff --git a/test/specs/scale.time.tests.js b/test/specs/scale.time.tests.js index 421aab928..070222117 100755 --- a/test/specs/scale.time.tests.js +++ b/test/specs/scale.time.tests.js @@ -1521,7 +1521,7 @@ describe('Time scale tests', function() { }); it ('should reverse the values for pixels', function() { - var scale = this.chart.chart.scales.x; + var scale = this.chart.scales.x; expect(scale.getValueForPixel(scale.left)).toBeCloseToTime({ value: moment('2042-01-01T00:00:00'), unit: 'hour',