Fix eventhandler install for temporal
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good Details

2022.01
Willem Dantuma 2021-01-26 17:07:45 +01:00
parent e75afdc01d
commit 290d5d1d26
1 changed files with 2 additions and 2 deletions

View File

@ -310,7 +310,7 @@ 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') {
if(this.itemLayer.item.itemType == 'vnd.farmmaps.itemtype.shape.processed' || (this.itemLayer as ITemporalItemLayer).temporalItems && (this.itemLayer as ITemporalItemLayer).temporalItems.length && (this.itemLayer as ITemporalItemLayer).temporalItems[0].itemType == 'vnd.farmmaps.itemtype.shape.processed' ) {
this.installMapEventHandler();
}
this.updateLayers([this.itemLayer])
@ -428,7 +428,7 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
var itemLayer = changes['itemLayer'].currentValue as IItemLayer;
this.itemLayer = itemLayer
if(itemLayer) {
if(itemLayer.item.itemType == 'vnd.farmmaps.itemtype.shape.processed') {
if(this.itemLayer.item.itemType == 'vnd.farmmaps.itemtype.shape.processed' || (this.itemLayer as ITemporalItemLayer).temporalItems && (this.itemLayer as ITemporalItemLayer).temporalItems.length && (this.itemLayer as ITemporalItemLayer).temporalItems[0].itemType == 'vnd.farmmaps.itemtype.shape.processed' ) {
this.installMapEventHandler();
}
this.updateLayers([itemLayer]);