Skip to content

Commit

Permalink
refactor(#4): add "Saved Point coordinates" to the list of annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
franmagn committed Oct 13, 2025
1 parent 052e946 commit cec8774
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/AnnotationControl/annotationPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,14 +198,18 @@ export function initAnnotationsPanel(viewer) {
ann.cameraTarget || ann.camera_target || ann.cameraPivot
)

if (cam || camTarget) {
const pointPos = vecToArray(
ann.position || ann.annotationPosition || ann.pos
)

if (cam || camTarget || pointPos) {
const info = document.createElement('div')
info.className = 'annotation-info'
info.style.fontSize = '0.8em'
info.style.marginLeft = '8px'
const fmt = (v) =>
v ? v.map((c) => Number(c).toFixed(3)).join(', ') : '—'
info.innerHTML = `Camera coordinates: ${fmt(cam)}<br/>Pivot coordinates: ${fmt(camTarget)}`
info.innerHTML = `Camera coordinates: ${fmt(cam)}<br/>Pivot coordinates: ${fmt(camTarget)}<br/>Saved Point coordinates: ${fmt(pointPos)}`;
row.appendChild(info)
}
} catch (e) {
Expand Down

0 comments on commit cec8774

Please sign in to comment.