Skip to content

Commit 165ec56

Browse files
authored
Merge pull request #183 from camicroscope/release
Bugfix Release (Fuzz Numeric and 2.X style annot detail)
2 parents 9dfc784 + 5ea4907 commit 165ec56

22 files changed

+226
-126
lines changed

apps/heatmap/heatmap.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,15 +189,15 @@
189189
}
190190

191191
else if(!$D.params.execId){
192-
redirect($D.pages.table,'execId is undefined. Redirecting to Table.');
192+
redirect($D.pages.table,'ExecId Is Undefined. Redirecting To Table.');
193193
}
194194

195195
else if ($D.params && ($D.params.slide || $D.params.specimen ||$D.params.study || $D.params.location)){
196196
let STORE = new Store()
197197
STORE.findSlide($D.params.slide, $D.params.study, $D.params.specimen, $D.params.location).then(x=>{
198198
let offset = parseInt($D.params.offset,10) || 0;
199199
if(x.length == 0 || offset >= x.length){
200-
redirect($D.pages.table,'No Slide Found. Redirecting to Table.');
200+
redirect($D.pages.table,'No Slide Found. Redirecting To Table.');
201201
} else {
202202
newParams = $D.params
203203
delete newParams.data
@@ -210,13 +210,13 @@
210210
}
211211
}).catch(e=>{
212212
console.warn(e)
213-
redirect($D.pages.table,'Redirecting to Table.');
213+
redirect($D.pages.table,'Redirecting To Table.');
214214
})
215215
// find the associated slideID
216216
// open viewer with that slideID
217217
}
218218
else {
219-
redirect($D.pages.table,'Slide is undefined. Redirecting to Table.');
219+
redirect($D.pages.table,'Slide Is Undefined. Redirecting To Table.');
220220
}
221221

222222
// get states parameters

apps/heatmap/init.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ function initCore(){
8989

9090

9191
if(!$D.heatMapData){
92-
redirect($D.pages.table,`No Heatmap's data Found. Redirecting to Table.`);
92+
redirect($D.pages.table,`No Heatmap's Data Found. Redirecting To Table.`);
9393
}
9494

9595

@@ -185,7 +185,7 @@ function initCore(){
185185
// editedDate:$D.
186186
onFieldChange: editorPenChange,
187187
onReset: function(){
188-
if(confirm('Do you want to clear edited data?')){
188+
if(confirm('Do You Want To Clear Edited Data?')){
189189
$CAMIC.viewer.canvasDrawInstance.clear();
190190
}
191191
}, // clearEditData

apps/heatmap/uicallbacks.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ function heatmapEditorOff(){
371371
2. Analytics
372372
*/
373373
async function onUpdateHeatmapFields(){
374-
if(!confirm('Do you want to update Threshold values?')) return;
374+
if(!confirm('Do You Want To Update Threshold?')) return;
375375
Loading.open(document.body,'Saving Threshold ... ');
376376
const fields = $D.heatMapData.provenance.analysis.fields;
377377
const subject = $D.heatMapData.provenance.image.subject_id;
@@ -384,7 +384,7 @@ async function onUpdateHeatmapFields(){
384384

385385
async function onExportEditData(){
386386
if($D.editedDataClusters.isEmpty()){
387-
alert('There are no edit data to export...');
387+
alert('No Edit Data ... ');
388388
return;
389389
}
390390
const user = getUserId();
@@ -548,8 +548,8 @@ async function onDeleteEditData(data){
548548
const cluster = data.cluster;
549549
const idx = data.index;
550550

551-
if(!confirm(`Do you want to delete { ${cluster.name} - ${cluster.value==0?'Negative':'Positive'} index:${idx} }?`)) return;
552-
Loading.open(document.body,`deleting Edit Data ...`);
551+
if(!confirm(`Do You Want To Delete { ${cluster.name} - ${cluster.value==0?'Negative':'Positive'} Index:${idx} }?`)) return;
552+
Loading.open(document.body,`Deleting Edit Data ...`);
553553

554554
// UPDATE EDIT DATA
555555
$D.editedDataClusters.removeEditDataForCluster(cluster.index, cluster.name, cluster.value, cluster.color, idx);

apps/labeling/labeling.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
createWarningText('You are using an <strong>IE/Edge</strong> browser that may be lead to erratic behavior on caMicroscope. Please switch to <a href="https://www.google.com/chrome/">Chrome</a>, <a href="https://www.mozilla.org/en-US/firefox/new/">Firefox</a> or <a href="https://www.apple.com/safari/">Safari</a> browser to improve your experience.');
9292
}
9393

94-
Loading.open(document.body, 'CaMicroscope is initializing...');
94+
Loading.open(document.body, 'CaMicroscope Is Initializing...');
9595
// get slide id from url
9696
const url = new URL(window.location.href);
9797
$D.params = getUrlVars();
@@ -105,7 +105,7 @@
105105
STORE.findSlide($D.params.slide, $D.params.study, $D.params.specimen, $D.params.location).then(x=>{
106106
let offset = parseInt($D.params.offset,10) || 0;
107107
if(x.length == 0 || offset >= x.length){
108-
redirect($D.pages.table,'No Slide Found. Redirecting to Table.');
108+
redirect($D.pages.table,'No Slide Found. Redirecting To Table.');
109109
} else {
110110
newParams = $D.params
111111
delete newParams.data
@@ -118,12 +118,12 @@
118118
}
119119
}).catch(e=>{
120120
console.warn(e)
121-
redirect($D.pages.table,'Redirecting to Table.');
121+
redirect($D.pages.table,'Redirecting To Table.');
122122
})
123123
// find the associated slideID
124124
// open viewer with that slideID
125125
}else{
126-
redirect($D.pages.table,'Slide Id is undefined. Redirecting to Flex Table.');
126+
redirect($D.pages.table,'Slide Id Is Undefined. Redirecting To Flex Table.');
127127
}
128128

129129
// get states parameters

apps/labeling/labeling.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ function initCore(){
154154
}
155155
function downloadLabel(){
156156
if(!$CAMIC.viewer.pmanager.hasPatches()){
157-
alert('There is no patches');
157+
alert('There Is No Patches');
158158
return;
159159
}
160160

apps/segment/segment.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163
STORE.findSlide($D.params.slide, $D.params.study, $D.params.specimen, $D.params.location).then(x=>{
164164
let offset = parseInt($D.params.offset,10) || 0;
165165
if(x.length == 0 || offset >= x.length){
166-
redirect($D.pages.table,'No Slide Found. Redirecting to Table.');
166+
redirect($D.pages.table,'No Slide Found. Redirecting To Table.');
167167
} else {
168168
newParams = $D.params
169169
delete newParams.data
@@ -176,13 +176,13 @@
176176
}
177177
}).catch(e=>{
178178
console.warn(e)
179-
redirect($D.pages.table,'Redirecting to Table.');
179+
redirect($D.pages.table,'Redirecting To Table.');
180180
})
181181
// find the associated slideID
182182
// open viewer with that slideID
183183
}
184184
else {
185-
redirect($D.pages.table,'Slide is undefined. Redirecting to Table.');
185+
redirect($D.pages.table,'Slide Is Undefined. Redirecting To Table.');
186186
}
187187

188188
// get states parameters

apps/segment/segment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ function checkSize(imgColl, imagingHelper) {
290290

291291
// check that image size is ok
292292
if (width * height > 8000000) {
293-
alert("Selected ROI too large, current version is limited to 4 megapixels");
293+
alert("Selected ROI Too Large, Current Version Is Limited To 4 Megapixels");
294294
// Clear the rectangle canvas-draw-overlay.clear()
295295
$CAMIC.viewer.canvasDrawInstance.clear();
296296
return {}; //throw('image too large')

apps/segment/segmentpanel/segmentpanel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ SegmentPanel.prototype.close = function(){
111111
};
112112

113113
SegmentPanel.prototype.save = function(){
114-
alert('Saving Image and Mask!');
114+
alert('Saving Image And Mask!');
115115
};
116116

117117
SegmentPanel.prototype.showThreshBar = function(){

apps/table.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@
306306
if(i==0) default_btn.push("NO DATA")
307307
else default_btn.push('')
308308
});
309-
const btn = `<button class="btn" onclick='alert("no data")'>Open</button>`
309+
const btn = `<button class="btn" onclick='alert("No Data")'>Open</button>`
310310
default_btn.push(btn);
311311
return [default_btn];
312312
}

apps/viewer/uicallbacks.js

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ label.style.width = 0;
187187

188188
function draw(e){
189189
if(!$CAMIC.viewer.canvasDrawInstance){
190-
alert('draw doesn\'t initialize');
190+
alert('Draw Doesn\'t Initialize');
191191
return;
192192
}
193193
const state = +e.state;
@@ -252,7 +252,7 @@ function annotationOff(){
252252
if(!$CAMIC.viewer.canvasDrawInstance) return;
253253
const canvasDraw = $CAMIC.viewer.canvasDrawInstance;
254254

255-
if(canvasDraw._draws_data_.length && confirm(`Do you want to save annotation before you leave?`)){
255+
if(canvasDraw._draws_data_.length && confirm(`Do You Want To Save Annotation Before You Leave?`)){
256256
saveAnnotation();
257257
}else{
258258
canvasDraw.clear();
@@ -389,9 +389,9 @@ function anno_delete(data){
389389
const annotationData = $D.overlayers.find(d=>d.data && d.data._id.$oid == data.oid);
390390
let message;
391391
if(annotationData.data.geometries){
392-
message = `Are you sure you want to delete this Annotation {ID:${data.id}} with ${annotationData.data.geometries.features.length} mark(s)?`;
392+
message = `Are You Sure You Want To Delete This Annotation {ID:${data.id}} With ${annotationData.data.geometries.features.length} Mark(s)?`;
393393
}else{
394-
message = `Are you sure you want to delete this markup {ID:${data.id}}?`;
394+
message = `Are You Sure You Want To Delete This Markup {ID:${data.id}}?`;
395395
}
396396
$UI.annotPopup.close();
397397
if(!confirm(message)) return;
@@ -499,7 +499,7 @@ function anno_callback(data){
499499
// has Path?
500500

501501
if($CAMIC.viewer.canvasDrawInstance._path_index===0){
502-
alert('No Markup on Annotation.');
502+
alert('No Markup On Annotation.');
503503
return;
504504
}
505505
// save
@@ -652,7 +652,7 @@ function loadAnnotationById(camic, layerData ,callback){
652652
layerData.item.loading = true;
653653
const item = layerData.item;
654654

655-
Loading.open(document.body,'loading layers...');
655+
Loading.open(document.body,'Loading Layers...');
656656

657657
$CAMIC.store.getMarkByIds([item.id],$D.params.data.name)
658658
.then(data =>{
@@ -692,9 +692,10 @@ function loadAnnotationById(camic, layerData ,callback){
692692
return [Math.round(point[0]*imgWidth),Math.round(point[1]*imgHeight)];
693693
});
694694
d.properties.style = {
695-
color: "#7CFC00",
695+
color: "#000080",
696696
lineCap: "round",
697-
lineJoin: "round"
697+
lineJoin: "round",
698+
isFill:false
698699
};
699700
return {
700701
_id:d._id,
@@ -705,6 +706,8 @@ function loadAnnotationById(camic, layerData ,callback){
705706
});
706707
// if(item) data[0].isShow = item.isShow;
707708
item.render = old_anno_render;
709+
item.clickable = false;
710+
item.hoverable = false;
708711
}else{
709712
data[0].geometries = VieweportFeaturesToImageFeatures(camic.viewer, data[0].geometries);
710713
item.data = data[0];
@@ -796,7 +799,7 @@ function hostedHeatmap(){
796799
if (typeof list === "undefined") { list = [] }
797800
// get heatmap data
798801
if(!list.length){
799-
alert(`${slide} has No heatmap data.`);
802+
alert(`${slide} Has No Heatmap Data.`);
800803
return;
801804
}
802805
createHeatMapList(list);
@@ -849,7 +852,7 @@ function imgboxHeatmap(){
849852

850853
data.provenance.image.slide = slide
851854
const execId = data.provenance.analysis.execution_id;
852-
Loading.open(document.body,'loading Heatmap...');
855+
Loading.open(document.body,'Loading Heatmap...');
853856
$CAMIC.store.addHeatmap(data).then(rs=>{
854857
window.location.href = `../heatmap/heatmap.html${window.location.search}&execId=${execId}`;
855858
}).catch(e=>{
@@ -892,6 +895,9 @@ function anno_render(ctx,data){
892895
//DrawHelper.draw(this._canvas_ctx, this.data.canvasData);
893896
}
894897
function old_anno_render(ctx,data){
898+
const imagingHelper = this.viewer.imagingHelper;
899+
const lineWidth = (imagingHelper.physicalToDataX(1) - imagingHelper.physicalToDataX(0))>> 0;
900+
ctx.lineWidth = lineWidth;
895901
DrawHelper.draw(ctx, data);
896902

897903
}

0 commit comments

Comments
 (0)