More type fixes
This commit is contained in:
@@ -57,7 +57,7 @@ export class ItemVectorSourceComponent extends SourceVectorComponent implements
|
||||
|
||||
getSelectedStyle(feature:Feature<Geometry>):style.Style {
|
||||
let key = feature.get('itemType')+"_selected";
|
||||
let evaluatedStyle: style.Style | (Feature<Geometry>) =undefined;
|
||||
let evaluatedStyle: style.Style =undefined;
|
||||
var styleEntry = this.stylesCache[key];
|
||||
if(styleEntry) {
|
||||
if(typeof styleEntry === 'function') {
|
||||
@@ -66,10 +66,10 @@ export class ItemVectorSourceComponent extends SourceVectorComponent implements
|
||||
evaluatedStyle = styleEntry;
|
||||
}
|
||||
} else {
|
||||
evaluatedStyle = this.stylesCache["selected"];
|
||||
evaluatedStyle = this.stylesCache["selected"] as style.Style;
|
||||
}
|
||||
if(evaluatedStyle ) {
|
||||
evaluatedStyle.setGeometry((feature) => this.geometry(feature));
|
||||
evaluatedStyle .setGeometry((feature:Feature<Geometry>) => this.geometry(feature));
|
||||
}
|
||||
return evaluatedStyle as style.Style
|
||||
}
|
||||
|
Reference in New Issue
Block a user