Draw rows take an application's own actions

createApplicationTools({ drawMarkActions }) adds an application's buttons to
the rows of drawn areas and lines. An action gets the shape's id, kind, name,
row title and [lon, lat] geometry, and what it returns or resolves to is a
note under the row. The standalone shell passes none, so the open-source
build is unchanged.
This commit is contained in:
Sameh Khamis committed 2026-11-08 18:12:32 -08:00
1 parent 922712121c
commit 27847bd063
9 files changed
+643 -16

No files matched your search

+20
View File
@@ -987,6 +987,26 @@ html:not([lang='en']) .pp-slider-row > .pp-slider-mini-label {
.draw-mark-row.hidden-mark .draw-mark-swatch {
opacity: 0.45;
}
/* What an application's row action said (a measurement, a confirmation), under
the row; empty, it takes no room. */
.draw-mark-note {
order: 2;
flex-basis: 100%;
padding: 0 0 2px 16px;
font-family: var(--font-mono);
font-size: 10px;
letter-spacing: 0.4px;
color: var(--text-dim);
overflow-wrap: anywhere;
}
.draw-mark-note:empty {
display: none;
}
/* Busy, but focusable: disabling the pressed button would drop focus. */
.draw-mark-action[aria-disabled='true'] {
opacity: 0.5;
cursor: progress;
}
.draw-mark-colors {
/* Right after its swatch for keyboard and screen readers, shown last. */
order: 1;