From 1b9d538dee8d859fd9440f14513e41b67397d851 Mon Sep 17 00:00:00 2001 From: Nan Li Date: Tue, 12 Nov 2019 15:34:07 -0500 Subject: [PATCH] quick fixed the bug that the annotation can't be drawn. --- apps/viewer/uicallbacks.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/apps/viewer/uicallbacks.js b/apps/viewer/uicallbacks.js index b69b91b46..6bb41a2b9 100644 --- a/apps/viewer/uicallbacks.js +++ b/apps/viewer/uicallbacks.js @@ -1510,10 +1510,11 @@ function locationCallback(layerData) { if (item.typeName !== "human" || item.data == null) return; if (item.data.geometries.features[0].geometry.type == "Point") { const bound = item.data.geometries.features[0].bound.coordinates; - const center = $CAMIC.viewer.viewport.imageToViewportCoordinates(bound[0],bound[1]) - $CAMIC.viewer.viewport.panTo( - center + const center = $CAMIC.viewer.viewport.imageToViewportCoordinates( + bound[0], + bound[1] ); + $CAMIC.viewer.viewport.panTo(center); } else { const bound = item.data.geometries.features[0].bound.coordinates[0]; locateAnnotation(bound); @@ -1581,10 +1582,12 @@ function saveAnalytics() { function startDrawing(e) { if ( $UI.toolbar.getSubTool("preset_label").querySelector("input[type=checkbox]") - .checked || - $UI.toolbar.getSubTool("brush").querySelector("input[type=checkbox]") .checked ) { + // || + // $UI.toolbar.getSubTool("brush").querySelector("input[type=checkbox]") + // .checked + // ) $CAMIC.viewer.canvasDrawInstance.stop = false; } else { $CAMIC.viewer.canvasDrawInstance.stop = !$UI.annotOptPanel._form_.isValid();