Skip to content

Commit

Permalink
fixed map popup location
Browse files Browse the repository at this point in the history
  • Loading branch information
KoalaGeo committed Sep 12, 2023
1 parent 877deb7 commit d960679
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 2 additions & 0 deletions app/static/js/htmlView.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ agsHtml.injectResultPopup=function(){

agsHtml.hideResultPopup=function(){
$("#resultPopup").hide();
if(agsMap && agsMap.positionExtentModal){agsMap.positionExtentModal();};
return true;
};

Expand Down Expand Up @@ -160,6 +161,7 @@ agsHtml.parseValidationResponse=function(jData){
agsHtml.displayFileResult(fileResult);
};
$("#resultPopup").show();
if(agsMap && agsMap.positionExtentModal){agsMap.positionExtentModal();};
return true;
};

Expand Down
12 changes: 9 additions & 3 deletions app/static/js/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,14 +217,20 @@ agsMap.drawing.enableDrawing=function(){
};

agsMap.showExtentModal=function(polyData){
var mapOffset=$("#mapid").offset();
var mapWidth=$("#mapid").width();
$("#polyArea").html(polyData.area + "m²");
$("#polyCount").html("(loading ...)");
$("#extentModal>p.extentMsg").hide();
$("#extentValid>a").attr("href","#");
agsMap.checkExtent(polyData.wkt);
$("#extentModal").css("width",mapWidth + "px").css("left",mapOffset.left + "px").css("top",mapOffset.top + "px").show();
agsMap.positionExtentModal();
$("#extentModal").show();
return true;
};

agsMap.positionExtentModal=function(){
var mapOffset=$("#mapid").offset();
var mapWidth=$("#mapid").width();
$("#extentModal").css("width",mapWidth + "px").css("left",mapOffset.left + "px").css("top",mapOffset.top + "px");
return true;
};

Expand Down

0 comments on commit d960679

Please sign in to comment.