Skip to content

Commit

Permalink
go back if no mpp
Browse files Browse the repository at this point in the history
  • Loading branch information
birm committed Sep 14, 2023
1 parent 119b324 commit 02853c5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/labeling/pitfalls.js
Original file line number Diff line number Diff line change
Expand Up @@ -1379,6 +1379,10 @@ function addAnnot(e) {
if ($CAMIC.slideData.mpp){
halfWidth = Math.floor(250/$CAMIC.slideData.mpp);
halfHeight = Math.floor(250/$CAMIC.slideData.mpp);
} else {
// alert and return
alert("This image doesn't have the microns per pixel (mpp) defined. Please resolve this issue before working with this image.");
window.location = `./pitfallsTable.html?collectionId=${$D.params.collectionId}`;
}
let ctr = $CAMIC.viewer.viewport.viewportToImageCoordinates($CAMIC.viewer.viewport.pointFromPixel(e.position, true));
let xCtr = Math.round(ctr.x);
Expand Down

0 comments on commit 02853c5

Please sign in to comment.