Fix hover and select remove @Host()
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:
@@ -26,7 +26,7 @@ export class GpsLocation implements OnInit,OnChanges{
|
||||
initialized:boolean = false;
|
||||
@ViewChild('location', { static: true }) locationElement: ElementRef;
|
||||
|
||||
constructor(@Host() private map: MapComponent) {
|
||||
constructor(private map: MapComponent) {
|
||||
|
||||
}
|
||||
|
||||
|
@@ -36,7 +36,7 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
|
||||
private selectedFeatures = {};
|
||||
private selectionLayer:Layer = null;
|
||||
|
||||
constructor(private itemService: ItemService, @Host() private map: MapComponent, public appConfig: AppConfig) {
|
||||
constructor(private itemService: ItemService, private map: MapComponent, public appConfig: AppConfig) {
|
||||
super(map);
|
||||
this._apiEndPoint = appConfig.getConfig("apiEndPoint");
|
||||
}
|
||||
|
@@ -38,7 +38,7 @@ export class ItemVectorSourceComponent extends SourceVectorComponent implements
|
||||
@Output() onFeatureHover: EventEmitter<Feature> = new EventEmitter<Feature>();
|
||||
private stylesCache:IStyles = {};
|
||||
|
||||
constructor(@Host() private layer: LayerVectorComponent, private itemService: ItemService, @Host() private map: MapComponent, private itemTypeService: ItemTypeService,private featureIconService$:FeatureIconService) {
|
||||
constructor(@Host() private layer: LayerVectorComponent, private itemService: ItemService, private map: MapComponent, private itemTypeService: ItemTypeService,private featureIconService$:FeatureIconService) {
|
||||
super(layer);
|
||||
this._format = new GeoJSON();
|
||||
}
|
||||
@@ -116,6 +116,8 @@ export class ItemVectorSourceComponent extends SourceVectorComponent implements
|
||||
if (!this.stylesCache[key]) {
|
||||
if (this.itemTypeService.itemTypes[key]) {
|
||||
let itemType = this.itemTypeService.itemTypes[key];
|
||||
let fillColor = color.asArray(itemType.iconColor);
|
||||
fillColor[3] = 0;
|
||||
this.stylesCache[key] = new style.Style({
|
||||
image: itemType.icon ? new style.Icon({
|
||||
anchor: [0.5, 1],
|
||||
@@ -126,6 +128,9 @@ export class ItemVectorSourceComponent extends SourceVectorComponent implements
|
||||
color: 'red',
|
||||
width: 1
|
||||
}),
|
||||
fill: new style.Fill({
|
||||
color: fillColor
|
||||
}),
|
||||
geometry:(feature) => this.geometry(feature)
|
||||
});
|
||||
} else {
|
||||
|
@@ -29,7 +29,7 @@ export class RotationResetComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
constructor( @Host() private map: MapComponent, private changeDetectorRef$: ChangeDetectorRef ) {
|
||||
constructor( private map: MapComponent, private changeDetectorRef$: ChangeDetectorRef ) {
|
||||
}
|
||||
|
||||
handleClick(event:Event) {
|
||||
|
Reference in New Issue
Block a user