Revert Ember.run refactors

This reverts commit 5ca60fcb6b592524086f98279d3e4fd949598343.
This commit is contained in:
Robin Ward
2019-10-29 17:10:47 -04:00
parent cfa5d123a3
commit fcb1ca52f9
153 changed files with 319 additions and 493 deletions

View File

@ -1,5 +1,3 @@
import { debounce } from "@ember/runloop";
import { schedule } from "@ember/runloop";
import Component from "@ember/component";
import { number } from "discourse/lib/formatter";
import loadScript from "discourse/lib/load-script";
@ -13,7 +11,7 @@ export default Component.extend({
this._super(...arguments);
this.resizeHandler = () =>
debounce(this, this._scheduleChartRendering, 500);
Ember.run.debounce(this, this._scheduleChartRendering, 500);
},
didInsertElement() {
@ -33,11 +31,11 @@ export default Component.extend({
didReceiveAttrs() {
this._super(...arguments);
debounce(this, this._scheduleChartRendering, 100);
Ember.run.debounce(this, this._scheduleChartRendering, 100);
},
_scheduleChartRendering() {
schedule("afterRender", () => {
Ember.run.schedule("afterRender", () => {
this._renderChart(
this.model,
this.element && this.element.querySelector(".chart-canvas")