Fix hover and select remove @Host()
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good

This commit is contained in:
Willem Dantuma 2021-01-26 09:12:37 +01:00
parent ac352473a0
commit d2b8de17d1
9 changed files with 22 additions and 11 deletions

6
package-lock.json generated
View File

@ -8361,9 +8361,9 @@
"integrity": "sha512-6YHXtdXkGH3w0NQoaUgNYAcrj064Lv5RTO284ha/hvpNTrh55yQz2cVh0VvwBk3MjyY2tdmLH4SuCJDszYdYiw==" "integrity": "sha512-6YHXtdXkGH3w0NQoaUgNYAcrj064Lv5RTO284ha/hvpNTrh55yQz2cVh0VvwBk3MjyY2tdmLH4SuCJDszYdYiw=="
}, },
"ngx-openlayers": { "ngx-openlayers": {
"version": "1.0.0-next.16", "version": "1.0.0-next.17",
"resolved": "https://registry.npmjs.org/ngx-openlayers/-/ngx-openlayers-1.0.0-next.16.tgz", "resolved": "https://registry.npmjs.org/ngx-openlayers/-/ngx-openlayers-1.0.0-next.17.tgz",
"integrity": "sha512-GzNCyjj72AHEcmf8oT6SDSZLYBwKBJwRebMv1SgPdY4gsoQ/dbpqY7nmjX8k8kuQoVQQxt7UyIak3tcNYbOKVQ==" "integrity": "sha512-Kqw056VIgolpiLsf8xPWlkHyKKCa4vh9ORzWCo6c1KvvYxVWriofidnOIzJZ4q768iE+hNgt9ERRI+DexoPFwg=="
}, },
"ngx-uploadx": { "ngx-uploadx": {
"version": "3.5.2", "version": "3.5.2",

View File

@ -33,7 +33,7 @@
"core-js": "^2.6.11", "core-js": "^2.6.11",
"ngrx-store-localstorage": "^10.0", "ngrx-store-localstorage": "^10.0",
"ngx-bootstrap": "^5.6.1", "ngx-bootstrap": "^5.6.1",
"ngx-openlayers": "1.0.0-next.16", "ngx-openlayers": "1.0.0-next.17",
"ngx-uploadx": "^3.5.1", "ngx-uploadx": "^3.5.1",
"ol": "6.4.3", "ol": "6.4.3",
"ol-cesium": "^2.11.3", "ol-cesium": "^2.11.3",

View File

@ -26,7 +26,7 @@ export class GpsLocation implements OnInit,OnChanges{
initialized:boolean = false; initialized:boolean = false;
@ViewChild('location', { static: true }) locationElement: ElementRef; @ViewChild('location', { static: true }) locationElement: ElementRef;
constructor(@Host() private map: MapComponent) { constructor(private map: MapComponent) {
} }

View File

@ -36,7 +36,7 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
private selectedFeatures = {}; private selectedFeatures = {};
private selectionLayer:Layer = null; 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); super(map);
this._apiEndPoint = appConfig.getConfig("apiEndPoint"); this._apiEndPoint = appConfig.getConfig("apiEndPoint");
} }

View File

@ -38,7 +38,7 @@ export class ItemVectorSourceComponent extends SourceVectorComponent implements
@Output() onFeatureHover: EventEmitter<Feature> = new EventEmitter<Feature>(); @Output() onFeatureHover: EventEmitter<Feature> = new EventEmitter<Feature>();
private stylesCache:IStyles = {}; 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); super(layer);
this._format = new GeoJSON(); this._format = new GeoJSON();
} }
@ -116,6 +116,8 @@ export class ItemVectorSourceComponent extends SourceVectorComponent implements
if (!this.stylesCache[key]) { if (!this.stylesCache[key]) {
if (this.itemTypeService.itemTypes[key]) { if (this.itemTypeService.itemTypes[key]) {
let itemType = 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({ this.stylesCache[key] = new style.Style({
image: itemType.icon ? new style.Icon({ image: itemType.icon ? new style.Icon({
anchor: [0.5, 1], anchor: [0.5, 1],
@ -126,6 +128,9 @@ export class ItemVectorSourceComponent extends SourceVectorComponent implements
color: 'red', color: 'red',
width: 1 width: 1
}), }),
fill: new style.Fill({
color: fillColor
}),
geometry:(feature) => this.geometry(feature) geometry:(feature) => this.geometry(feature)
}); });
} else { } else {

View File

@ -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) { handleClick(event:Event) {

View File

@ -64,6 +64,9 @@ export class MapEffects {
stroke: new style.Stroke({ stroke: new style.Stroke({
color: 'red', color: 'red',
width: 1 width: 1
}),
fill: new style.Fill({
color: 'rgba(0, 0, 0,0)'
}) })
}))); })));
actions.push(new mapActions.SetStyle('selected',new style.Style({ actions.push(new mapActions.SetStyle('selected',new style.Style({
@ -75,6 +78,9 @@ export class MapEffects {
stroke: new style.Stroke({ stroke: new style.Stroke({
color: 'red', color: 'red',
width: 3 width: 3
}),
fill: new style.Fill({
color: 'rgba(0, 0, 0, 0)'
}) })
}))); })));

View File

@ -17,7 +17,7 @@ export class Switch2D3DComponent {
private synchronizers:any[]; private synchronizers:any[];
constructor(@Host() private map: MapComponent) { constructor(private map: MapComponent) {
} }

View File

@ -1,9 +1,9 @@
{ {
"issuer": "https://accounts.test.farmmaps.eu", "issuer": "https://accounts.test.farmmaps.eu",
"clientId": "farmmapsdev", "clientId": "farmmapsdev",
"audience": "http://localhost:8082", "audience": "https://test.farmmaps.eu",
"requireHttps": true, "requireHttps": true,
"apiEndPoint": "http://localhost:8082", "apiEndPoint": "https://test.farmmaps.eu",
"grantType":"code" "grantType":"code"
} }