From 17e6f8068e0ff0854e2a57f3893cee95e7696300 Mon Sep 17 00:00:00 2001 From: YukaUU Date: Fri, 19 Jul 2024 00:17:23 +0900 Subject: [PATCH] fix Multi mode on the pencil tool seems to save all annotations --- apps/viewer/init.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/apps/viewer/init.js b/apps/viewer/init.js index 599d081c8..94dfb4ba1 100644 --- a/apps/viewer/init.js +++ b/apps/viewer/init.js @@ -222,8 +222,6 @@ function initCore() { } // for support QUIP 2.0 const data = Array.isArray(e.data) ? e.data[e.data.selected] : e.data; - console.log('data', data); - const type = data.provenance.analysis.source; let body; let attributes; @@ -261,11 +259,11 @@ function initCore() { // add center position and zoom - if (data.viewerStates != undefined) { + if (data.geometries.features[data.selected].viewerStates != null || data.geometries.features[data.selected].viewerStates != undefined) { const decimalPlaces = 3; - attributes.X = data.viewerStates.x, - attributes.Y = data.viewerStates.y, - attributes.zoom = roundTo(data.viewerStates.zoom, decimalPlaces); + attributes.X = data.geometries.features[data.selected].viewerStates.x, + attributes.Y = data.geometries.features[data.selected].viewerStates.y, + attributes.zoom = roundTo(data.geometries.features[data.selected].viewerStates.z, decimalPlaces); } // Rounds a number to the specified number of decimal places. function roundTo(num, decimalPlaces) {