Fix destroy and eventhandler install
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
This commit is contained in:
parent
8f54e095fe
commit
e75afdc01d
@ -310,6 +310,9 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
|
||||
if(this.itemLayers) {
|
||||
this.updateLayers(this.itemLayers);
|
||||
} else if(this.itemLayer) {
|
||||
if(this.itemLayer.item.itemType == 'vnd.farmmaps.itemtype.shape.processed') {
|
||||
this.installMapEventHandler();
|
||||
}
|
||||
this.updateLayers([this.itemLayer])
|
||||
} else {
|
||||
this.updateLayers([]);
|
||||
@ -439,6 +442,6 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
|
||||
|
||||
ngOnDestroy() {
|
||||
this.unInstallMapEventHandler();
|
||||
this.map.instance.removeLayer(this.instance);
|
||||
super.ngOnDestroy();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user