mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 02:44:02 +00:00
Keep Draw rows in place across board changes, and frame lines across the antimeridian
The shape list rebuilt every row on each board change. A name being typed was lost when a voice mark landed or expired, and a click right after typing only committed the name, because the button under the pointer was replaced. Rows are now updated in place, a re-entrant render is deferred, picking a colour or Esc returns focus to the swatch, and keys on the list no longer reach Draw. Fly-to on a line across the antimeridian flew to longitude 0. A drawn mark and a voice mark are no longer deduplicated into one another, so a voice TTL cannot expire a drawn pin, and a new pin on a hidden one is drawn. The engine tests now check effects (renderer calls, alpha, notifications on clear and expiry, the framed centre), not only return values.
This commit is contained in:
1 parent
94470ff00e
commit
bdbbc3d767
6 files changed
+428
-108
No files matched your search
@@ -310,6 +310,9 @@ export function initDrawTool({ viewer, annotations }) {
|
||||
};
|
||||
const onKey = (event) => {
|
||||
if (!active || destroyed || typingElsewhere(event)) return;
|
||||
// Keys on the shape list's own controls are the list's (Esc closes a
|
||||
// colour picker there), not the drawing's.
|
||||
if (markListEl?.contains?.(event.target)) return;
|
||||
// Enter goes to finish() once a shape has been started; finish() owns the
|
||||
// decision and says WHY it refused. Swallowing the key on a degenerate
|
||||
// shape left the person pressing Enter at a silent panel. A focused button
|
||||
|
||||
Reference in new issue
Block a user