Fix selected style
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good
This commit is contained in:
parent
79f45631a0
commit
52b4f90b78
@ -56,10 +56,18 @@ export class ItemVectorSourceComponent extends SourceVectorComponent implements
|
||||
|
||||
getSelectedStyle(feature:Feature):style.Style {
|
||||
let key = feature.get('itemType')+"_selected";
|
||||
if(this.stylesCache[key]) {
|
||||
return this.stylesCache[key];
|
||||
let evaluatedStyle =null;
|
||||
var styleEntry = this.stylesCache[key];
|
||||
if(styleEntry) {
|
||||
if(typeof styleEntry === 'function') {
|
||||
evaluatedStyle = styleEntry(feature);
|
||||
} else {
|
||||
evaluatedStyle = styleEntry;
|
||||
}
|
||||
return this.stylesCache["selected"];
|
||||
} else {
|
||||
evaluatedStyle = this.stylesCache["selected"];
|
||||
}
|
||||
return evaluatedStyle
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
Loading…
Reference in New Issue
Block a user