Skip to content

Commit

Permalink
Fix region loading from server
Browse files Browse the repository at this point in the history
Adding path from url to json url
  • Loading branch information
cavenel committed Nov 1, 2022
1 parent 2711768 commit 4790368
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tissuumaps/static/js/utils/regionUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -1167,6 +1167,12 @@ regionUtils.regionsToJSON= function(){

regionUtils.JSONToRegions= function(filepath){
if(filepath!==undefined){
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
const path = urlParams.get('path')
if (path != null) {
filepath = path + "/" + filepath;
}
fetch(filepath)
.then((response) => {
return response.json();
Expand Down

0 comments on commit 4790368

Please sign in to comment.