ui/map-renderer: clarify rationale for synthetic moved-event type
Expanding the comment so future readers know the `type` field is informational here — no `pixi-viewport@6` plugin or local listener switches on it, so picking any literal from the closed union works. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -93,8 +93,10 @@
|
|||||||
handle.viewport.moveCenter(cx, cy);
|
handle.viewport.moveCenter(cx, cy);
|
||||||
// `MovedEvent.type` is a closed literal union over the
|
// `MovedEvent.type` is a closed literal union over the
|
||||||
// built-in plugin names; `"animate"` is the closest
|
// built-in plugin names; `"animate"` is the closest
|
||||||
// match for a programmatic move and the renderer's
|
// match for a programmatic move. The renderer's
|
||||||
// listeners read only `viewport`.
|
// listeners (and `pixi-viewport@6`'s own plugins)
|
||||||
|
// read only `viewport` — no consumer switches on
|
||||||
|
// `type`, so the choice is informational.
|
||||||
handle.viewport.emit("moved", {
|
handle.viewport.emit("moved", {
|
||||||
viewport: handle.viewport,
|
viewport: handle.viewport,
|
||||||
type: "animate",
|
type: "animate",
|
||||||
|
|||||||
Reference in New Issue
Block a user