mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-25 09:03:12 +03:00
15 lines
381 B
JavaScript
15 lines
381 B
JavaScript
|
import Modifier from 'ember-modifier';
|
||
|
import {inject as service} from '@ember/service';
|
||
|
|
||
|
export default class MovableModifier extends Modifier {
|
||
|
@service resizeDetector;
|
||
|
|
||
|
didInstall() {
|
||
|
this.resizeDetector.setup(this.element, this.args.positional[0]);
|
||
|
}
|
||
|
|
||
|
willDestroy() {
|
||
|
this.resizeDetector.teardown(this.element, this.args.positional[0]);
|
||
|
}
|
||
|
}
|