Commit 640ca507 authored by Sebastian's avatar Sebastian

fixes GEOP-458

parent 8e71ed9c
......@@ -182,10 +182,10 @@
</div>
</div>
<div [ngClass]="{'float-right':true, 'sidecontainerright':true,'ausgeblendet':this.detailsState=='hidden'}"
<div [ngClass]="{'float-right':true, 'sidecontainerright':true,'ausgeblendet':detailsState()=='hidden'}"
*ngIf="nodeService.detailView">
<div class="searcheditPrepend">
<div *ngIf="detailsState=='visible'" class="searchedetailstogglePrepend">
<div *ngIf="detailsState()=='visible'" class="searchedetailstogglePrepend">
<div (click)="toggleVisibilityDetails();"
class="form-group item-detail name">
<label for="elementSearchDetails"
......@@ -193,7 +193,7 @@
class="fa fa-angle-double-right" aria-hidden="true"></i></label>
</div>
</div>
<div *ngIf="detailsState=='hidden'" class="searchedetailstogglePrepend">
<div *ngIf="detailsState()=='hidden'" class="searchedetailstogglePrepend">
<div (click)="toggleVisibilityDetails();"
class="form-group item-detail name">
<label for="elementSearchDetails"
......
......@@ -31,7 +31,6 @@ export class SearchComponent implements OnInit {
hasResults = false;
searched = false;
state = 'visible';
detailsState = 'hidden';
searchForm : FormGroup;
searchPattern = "";
allOsmNodes : Array<OsmNode>;
......@@ -72,7 +71,7 @@ export class SearchComponent implements OnInit {
show(element: OsmNode){
this.nodeService.showDetails(element);
this.detailsState = 'visible';
this.logger.debug("Showing all "+this.osmNodes.length + " nodes from searchresult");
// this.mapService.showNodes(this.osmNodes,'searchResult');
this.mapService.show(element,'detailView');
......@@ -299,19 +298,18 @@ export class SearchComponent implements OnInit {
}
}
toggleVisibilityDetails(){
if(this.detailsState=="hidden"){
this.detailsState="visible";
}else{
this.detailsState="hidden";
}
}
togglePeerVisibility(peer: OsmNode){
//this.logger.debug("toggling visibility of peer "+peer.name);
this.mapService.togglePeerVisibility(this.nodeService.detailView,peer);
}
detailsState():string{
return this.nodeService.detailsWidgetState;
}
toggleVisibilityDetails(){
return this.nodeService.toggleDetailsStateWidget();
}
isCurrentElement(node:OsmNode){
if(this.nodeService.detailView==null){
......
......@@ -511,6 +511,7 @@ export class MapService {
for(let node of nodeSet){
if(node.mapId == dataItem.getId()){
this.osmNodeService.showDetails(node);
this.osmNodeService.showDetailsWidget();
clickedElement = node;
}
......
......@@ -21,6 +21,7 @@ export class OsmNodeService {
message: string;
result: Array<OsmNode> = null;
dimensions : Array<BliDimension>;
detailsWidgetState : string = "hidden";
constructor(
private logger: LogService,
private apiService: GeoportalApiService,
......@@ -35,6 +36,23 @@ export class OsmNodeService {
this.dimensions = bliService.dimensions;
this.detailView = null;
}
/**
Detail-View-Sichtbarkeit
**/
toggleDetailsStateWidget(){
if(this.detailsWidgetState=="hidden"){
this.detailsWidgetState="visible";
}else{
this.detailsWidgetState="hidden";
}
}
hideDetailsWidget(){
this.detailsWidgetState = 'hidden';
}
showDetailsWidget(){
this.detailsWidgetState = 'visible';
}
updateElementFromServer(item: OsmNode){
if(item.id != -1 && item.id != undefined){
this.apiService.getGeoElementById(item.id).subscribe(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment