Commit 4bf5acc2 authored by katja heuer's avatar katja heuer Committed by GitHub
Browse files

Merge pull request #162 from Nnubes256/Nnubes256-patch-1

Update top-left information when clicking with the eye-dropper tool
parents 30f98e6e 557b57f3
......@@ -748,41 +748,48 @@ var AtlasMakerInteraction = {
me.User.mouseIsDown = false;
me.User.x0=-1;
me.sendUserDataMessage(JSON.stringify({'mouseIsDown':false}));
me.sendUserDataMessage(JSON.stringify({'mouseIsDown':false}));
var msg;
switch(me.User.tool) {
case 'show':
var msg={"c":"u"};
me.sendShowMessage(msg);
break;
case 'paint':
case 'erase':
var msg={c:"mu"};
me.sendPaintMessage(msg);
// add annotated length to User.annotation length and post to DB
me.logToDatabase("annotationLength",{
source:me.User.source,
atlas:me.User.atlasFilename,
length:me.annotationLength
})
.then(function(response){
var length = parseInt(response.length);
me.info.length = length+" mm";
me.displayInformation();
});
me.annotationLength=0;
// compute total segmented volume
var vol=me.computeSegmentedVolume();
me.info.volume=parseInt(vol)+" mm3";
break;
default:
var msg={"c":"mu"};
me.sendPaintMessage(msg);
}
case 'show':
var msg={"c":"u"};
me.sendShowMessage(msg);
break;
case 'paint':
case 'erase':
var msg={c:"mu"};
me.sendPaintMessage(msg);
// add annotated length to User.annotation length and post to DB
me.logToDatabase("annotationLength",{
source:me.User.source,
atlas:me.User.atlasFilename,
length:me.annotationLength
})
.then(function(response){
var length = parseInt(response.length);
me.info.length = length+" mm";
me.displayInformation();
});
me.annotationLength=0;
// compute total segmented volume
var vol=me.computeSegmentedVolume();
me.info.volume=parseInt(vol)+" mm3";
break;
case 'eyedrop':
me.displayInformation();
var msg={"c":"mu"};
me.sendPaintMessage(msg);
break;
default:
var msg={"c":"mu"};
me.sendPaintMessage(msg);
}
/*
TEST
......@@ -840,4 +847,4 @@ var AtlasMakerInteraction = {
me.sendChatMessage();
}
}
}
\ No newline at end of file
}
Supports Markdown
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