Fix select on hover ( null ref)
FarmMaps.Develop/FarmMapsLib/develop This commit looks good Details

pull/1/head
Willem Dantuma 2020-02-14 10:21:49 +01:00
parent 52b4f90b78
commit 81ed89b240
1 changed files with 4 additions and 1 deletions

View File

@ -67,6 +67,9 @@ export class ItemVectorSourceComponent extends SourceVectorComponent implements
} else {
evaluatedStyle = this.stylesCache["selected"];
}
if(evaluatedStyle && evaluatedStyle.geometry_ == null) {
evaluatedStyle.setGeometry((feature) => this.geometry(feature));
}
return evaluatedStyle
}
@ -135,7 +138,7 @@ export class ItemVectorSourceComponent extends SourceVectorComponent implements
} else {
evaluatedStyle = styleEntry;
}
if(evaluatedStyle.geometry_ == null) {
if(evaluatedStyle && evaluatedStyle.geometry_ == null) {
evaluatedStyle.setGeometry((feature) => this.geometry(feature));
}
return evaluatedStyle;