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:
@@ -91,9 +91,13 @@
|
|||||||
// (and any future per-move callback) sees the
|
// (and any future per-move callback) sees the
|
||||||
// change — matches the semantics of a user drag.
|
// change — matches the semantics of a user drag.
|
||||||
handle.viewport.moveCenter(cx, cy);
|
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", {
|
handle.viewport.emit("moved", {
|
||||||
viewport: handle.viewport,
|
viewport: handle.viewport,
|
||||||
type: "manual",
|
type: "animate",
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getViewport: () =>
|
getViewport: () =>
|
||||||
|
|||||||
Reference in New Issue
Block a user