Skip to content

Commit

Permalink
Merge branch '4-save-camera-positions-us5' into save-annotations-to-file
Browse files Browse the repository at this point in the history
  • Loading branch information
gautegf committed Oct 20, 2025
2 parents b626233 + 67de0a1 commit 5fbdeda
Show file tree
Hide file tree
Showing 4 changed files with 1,026 additions and 6 deletions.
4 changes: 4 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
rel="stylesheet"
href="/src/MeasurementControl/measurementsPanel.css"
/>
<link
rel="stylesheet"
href="/src/AnnotationControl/annotationPanel.css"
/>
</head>

<body>
Expand Down
279 changes: 279 additions & 0 deletions src/AnnotationControl/annotationPanel.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,279 @@
/* Hide Potree annotation icon specifically */
/* This targets the <img class="button-icon"> that references annotation.svg. */
img.button-icon[src$="/annotation.svg"]{
display: none !important;
visibility: hidden !important;
width: 0 !important;
height: 0 !important;
margin: 0 !important;
padding: 0 !important;
}

.annotation-desc {
font-size: 0.85em;
margin-left: 8px;
}

.annotation-info {
font-size: 0.8em;
margin-left: 8px;
}

.annotation-edit-textarea {
width: 100%;
}

.annotation-add-button {
margin: 10px 0;
}

.annotation-empty {
opacity: 0.6;
padding: 10px;
text-align: center;
}

.annotation-row {
display: flex;
flex-direction: column; /* stack header above body */
gap: 6px;
padding: 6px 8px;
margin: 10px 2px;
border-radius: 6px;
background: #2c3539;
border: 1px solid transparent;
transition: background 0.15s, border-color 0.15s;
color: #d9e2e6;
}

.annotation-row .annotation-label {
flex: 1;
min-width: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.annotation-header {
display: flex;
align-items: center;
gap: 8px;
width: 100%;
}
.annotation-body {
width: 100%;
margin-top: 6px;
}

/* By default hide the body (details); show when row has open */
.annotation-body {
display: none;
}
.annotation-row.open .annotation-body {
display: block;
}

.annotation-row .toggle-triangle {
display: inline-flex;
align-items: center;
justify-content: center;
width: 18px;
height: 18px;
font-size: 12px;
color: #8fb9c9;
vertical-align: middle;
cursor: pointer;
}
.annotation-row .toggle-triangle::after {
content: '▸';
}
.annotation-row.open .toggle-triangle::after {
content: '▾';
}

/* Jump button */
.annotation-row .jump-btn {
width: 28px;
height: 28px;
border-radius: 50%;
background: transparent;
color: #7fbcd3;
display: inline-flex;
align-items: center;
justify-content: center;
margin-left: 8px;
border: 1px solid rgba(127,188,211,0.28);
cursor: pointer;
transition: transform 0.12s ease, background 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, color 0.12s ease;
box-shadow: none;
}
.annotation-row .jump-btn::after {
content: '→';
font-weight: 700;
font-size: 13px;
line-height: 1;
}
.annotation-row .jump-btn:hover {
color: #7fbcd3;
border-color: rgba(14,166,217,0.44);
box-shadow: 0 8px 18px rgba(14,166,217,0.14), 0 0 0 3px rgba(14,166,217,0.06);
background: transparent;
}
.annotation-row .jump-btn:focus {
outline: none;
border-color: rgba(14,166,217,0.44);
box-shadow: 0 8px 22px rgba(14,166,217,0.18), 0 0 0 4px rgba(14,166,217,0.06);
}
.annotation-row .jump-btn:active,
.annotation-row .jump-btn[aria-pressed="true"] {
transform: translateY(1px);
background: linear-gradient(180deg, #28c1ff 0%, #0ea6d9 100%);
color: #fff;
border-color: transparent;
box-shadow: 0 6px 20px rgba(14,166,217,0.26), inset 0 1px 0 rgba(255,255,255,0.14);
}

.annotation-row .jump-btn.recently-pressed {
transform: translateY(1px);
background: linear-gradient(180deg, #28c1ff 0%, #0ea6d9 100%);
color: #fff;
border-color: transparent;
box-shadow: 0 6px 20px rgba(14,166,217,0.26), inset 0 1px 0 rgba(255,255,255,0.14);
transition: background 1.4s cubic-bezier(.2,.9,.2,1), box-shadow 1.4s cubic-bezier(.2,.9,.2,1), transform 0.12s ease, color 1.0s ease, opacity 1.4s ease;
}

.annotation-row .jump-btn.jump-disabled,
.annotation-row .jump-btn:disabled {
opacity: 0.44;
color: #9fbfcf;
border-color: rgba(127,188,211,0.12);
box-shadow: none;
cursor: default;
pointer-events: none;
}

.annotation-row .jump-btn.jump-disabled:hover,
.annotation-row .jump-btn.jump-disabled:focus,
.annotation-row .jump-btn:disabled:hover,
.annotation-row .jump-btn:disabled:focus {
transform: none;
box-shadow: none;
background: transparent;
}


.annotation-row .del-btn {
background: #3b2626;
border: 1px solid #5a3a3a;
color: #ff9a9a;
font-weight: 600;
font-size: 11px;
line-height: 1;
padding: 4px 6px;
border-radius: 4px;
cursor: pointer;
transition:
background 0.15s,
color 0.15s;
margin-left: 8px;
}
.annotation-row .del-btn:hover {
background: #5a2d2d;
color: #fff;
}

.annotation-row:hover {
background: #354045;
border-color: #425056;
}
.annotation-row.active {
background: #1f4b63;
border-color: #2f6b8c;
box-shadow: 0 0 0 1px #2f6b8c66;
}

.annotation-row .annotation-desc,
.annotation-row .annotation-info {
background: #2f383d;
padding: 8px;
border: 1px solid #404a50;
border-radius: 4px;
color: #cfd5d8;
font-family: inherit;
font-size: 12px;
white-space: pre-wrap;
overflow-wrap: anywhere;
}

.annotation-row .annotation-desc,
.annotation-row .annotation-info {
display: none;
}
.annotation-row.open .annotation-desc,
.annotation-row.open .annotation-info {
display: block;
margin-top: 6px;
}

.annotation-header .annotation-label {
margin-right: 8px;
}
.annotation-header .controls {
margin-left: auto;
display: flex;
gap: 8px;
align-items: center;
flex: 0 0 auto;
}

.annotation-header input[type="text"],
.annotation-header .annotation-label input[type="text"] {
width: 100%;
max-width: 100%;
box-sizing: border-box;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

/* Make the caret/triangle take up fixed space so it doesn't shift */
.annotation-row .toggle-triangle {
flex: 0 0 18px;
}

/* Add button */
.annotation-add-button {
background: linear-gradient(180deg,#f6f6f6 0%, #e9e9e9 100%);
color: #222;
padding: 8px 16px;
min-width: 140px;
height: 38px;
display: block;
margin: 12px auto;
border-radius: 6px;
font-size: 13px;
font-weight: 700;
box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
border: 1px solid #cfcfcf;
cursor: pointer;
text-align: center;
}
.annotation-add-button .add-label {
color: #222;
font-weight: 700;
}
.annotation-add-button:hover {
background: linear-gradient(180deg,#f3f3f3 0%, #e2e2e2 100%);
border-color: #bfbfbf;
}
.annotation-add-button:active {
transform: translateY(1px);
background: linear-gradient(180deg,#e9e9e9 0%, #dbdbdb 100%);
box-shadow: inset 0 2px 6px rgba(0,0,0,0.06);
}
.annotation-add-button:focus {
outline: 2px solid rgba(100,100,100,0.12);
outline-offset: 2px;
}

Loading

0 comments on commit 5fbdeda

Please sign in to comment.