Skip to content

Commit

Permalink
quick fixed the bug that the annotation can't be drawn.
Browse files Browse the repository at this point in the history
  • Loading branch information
nanli-emory committed Nov 12, 2019
1 parent a2e73ce commit 1b9d538
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions apps/viewer/uicallbacks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 1b9d538

Please sign in to comment.