Open
Description
Hello again,
I would like to implement resizable widgets. How can I include onResize event in WidgetComponent in manner of цшвпуе "onClose" event
Just adding a new event emitter is not enought:
@Output() onClose = new EventEmitter<any>();
@Output() onResize = new EventEmitter<any>();
It causing a error that:
during adding widget to dashboard:
this.ref[wId] = this.dashboard.addItem(component);
this.ref[wId].widgetId = wId;
this.ref[wId].setSize([wData.sizeX, wData.sizeY]);
this.ref[wId].ngOnInit();
this.ref[wId].onClose.subscribe(id => {
this.dashboard.removeItemById(id);
for (let w of this.dashboardWidgetDataList) {
if (w.name === wData.name) {
let index = this.dashboardWidgetDataList.indexOf(w, 0);
if (index > -1) {
this.dashboardWidgetDataList.splice(index, 1);
}
}
}
});
// HERE IS A ERROR --->
this.ref[wId].onResize.subscribe(data => {
this.ref[data.id].setSize([data.newSize.x, data.newSize.y]);
});
Any suggestions?
Metadata
Metadata
Assignees
Labels
No labels