ui/map-renderer: pin synthetic moved-event type to a real literal

`MovedEvent.type` in pixi-viewport@6 is a closed union of built-in
plugin names; the prior `"manual"` value tripped svelte-check.
`"animate"` is the closest semantic match for a programmatic move
and the renderer's listeners read only `viewport`.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Ilia Denisov
2026-05-08 23:46:24 +02:00
parent 3ed4531a01
commit 164f23fbed
@@ -91,9 +91,13 @@
// (and any future per-move callback) sees the
// change — matches the semantics of a user drag.
handle.viewport.moveCenter(cx, cy);
// `MovedEvent.type` is a closed literal union over the
// built-in plugin names; `"animate"` is the closest
// match for a programmatic move and the renderer's
// listeners read only `viewport`.
handle.viewport.emit("moved", {
viewport: handle.viewport,
type: "manual",
type: "animate",
});
},
getViewport: () =>