Skip to content

Commit

Permalink
Merge pull request #651 from CGDogan/CGDogan-patch-1
Browse files Browse the repository at this point in the history
Naming only: refer to iipsrv instead of openslide to prevent confusion
  • Loading branch information
birm authored Aug 21, 2023
2 parents 78a679d + b5f0edf commit 3ac47b1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions core/CaMic.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ class CaMic {
}
fetch(checkSlideUrl, {credentials: 'include'}).then((z)=>{
if (true) {
this.openSlide(data, func);
this.iipSrv(data, func);
} else {
Loading.text.textContent = 'Slide Source Returned Status Code: ' + z.status;
func.call(null,
Expand All @@ -192,16 +192,16 @@ class CaMic {
});
}

openSlide(data, func) {
iipSrv(data, func) {
this.slideId = data['_id']['$oid'];

this.slideName = data['name'];
// insert token if present
let openSlideUrl = '../../img/IIP/raw/?DeepZoom='+ data['location'] + '.dzi';
let iipSrvUrl = '../../img/IIP/raw/?DeepZoom='+ data['location'] + '.dzi';
if (getCookie('token')) {
openSlideUrl = '../../img/IIP/raw/?token=' + getCookie('token') + '&DeepZoom='+ data['location'] + '.dzi';
iipSrvUrl = '../../img/IIP/raw/?token=' + getCookie('token') + '&DeepZoom='+ data['location'] + '.dzi';
}
this.viewer.open(openSlideUrl);
this.viewer.open(iipSrvUrl);
// set mpp
this.mpp_x = +data['mpp-x'];
this.mpp_y = +data['mpp-y'];
Expand All @@ -222,7 +222,7 @@ class CaMic {
});

imagingHelper.setMaxZoom(1);
data.url = openSlideUrl;
data.url = iipSrvUrl;
data.slide = this.slideId;
if (func && typeof func === 'function') func.call(null, data);
Loading.text.textContent = `Loading Slide's Tiles...`;
Expand Down

0 comments on commit 3ac47b1

Please sign in to comment.