Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor() {
EVENTS.forEach(name => {
this[name] = new EventEmitter();
});
}
ngOnInit(): void {
ngOnInit(): void {
const options: MoveableOptions = {};
const events: IObject = {};
PROPERTIES.forEach(name => {
(options as any)[name] = this[name];
});
EVENTS.forEach(name => {
events[name] = e => {
this[name].emit(e);
};
});
this.moveable = new Moveable(this.container || document.body, options);
this.moveable.on(events);
}
ngOnChanges(changes: SimpleChanges): void {
ngOnInit(): void {
const options: MoveableOptions = {};
const events: IObject = {};
PROPERTIES.forEach(name => {
(options as any)[name] = this[name];
});
EVENTS.forEach(name => {
events[name] = e => {
this[name].emit(e);
};
});
this.moveable = new Moveable(this.container || document.body, options);
this.moveable.on(events);
}
ngOnChanges(changes: SimpleChanges): void {
ngOnInit(): void {
const options: MoveableOptions = {};
const events: IObject = {};
PROPERTIES.forEach(name => {
(options as any)[name] = this[name];
});
EVENTS.forEach(name => {
events[name] = e => {
this[name].emit(e);
};
});
this.moveable = new Moveable(this.container || document.body, options);
this.moveable.on(events);
}
ngOnChanges(changes: SimpleChanges): void {