diff --git a/addon/-private/data-view/utils/scroll-handler.js b/addon/-private/data-view/utils/scroll-handler.js index 81033aaa..e793b59d 100644 --- a/addon/-private/data-view/utils/scroll-handler.js +++ b/addon/-private/data-view/utils/scroll-handler.js @@ -1,4 +1,4 @@ -import { run } from '@ember/runloop'; +import { begin, end } from '@ember/runloop'; import { scheduler } from 'ember-raf-scheduler'; import SUPPORTS_PASSIVE from './supports-passive'; const DEFAULT_ARRAY_SIZE = 10; @@ -110,11 +110,11 @@ export class ScrollHandler { // TODO add explicit test if (topChanged || leftChanged) { - run.begin(); + begin(); for (let j = 0; j < meta.handlers.length; j++) { meta.handlers[j](event); } - run.end(); + end(); } } diff --git a/tests/dummy/app/routes/examples/dbmon/route.js b/tests/dummy/app/routes/examples/dbmon/route.js index 16106e74..2e4a54d2 100644 --- a/tests/dummy/app/routes/examples/dbmon/route.js +++ b/tests/dummy/app/routes/examples/dbmon/route.js @@ -1,5 +1,5 @@ import Route from '@ember/routing/route'; -import { run } from '@ember/runloop'; +import { later, next, cancel } from '@ember/runloop'; import getData from 'dummy/lib/get-data'; export default Route.extend({ @@ -11,12 +11,12 @@ export default Route.extend({ }, afterModel() { - run.later(this, this.loadSamples, 100); + later(this, this.loadSamples, 100); }, loadSamples() { this.controller.set('model', getData(this.numRows)); - this._nextLoad = run.next(this, this.loadSamples); + this._nextLoad = next(this, this.loadSamples); }, actions: { @@ -30,7 +30,7 @@ export default Route.extend({ }, willTransition() { - run.cancel(this._nextLoad); + cancel(this._nextLoad); this.controller.set('model', null); }