Uses the current player position rather than the starting one to position iframe
This commit is contained in:
parent
e39e341ab7
commit
516d756db1
4 changed files with 36 additions and 0 deletions
|
@ -31,6 +31,7 @@ import type { ChangeLayerEvent } from "./ChangeLayerEvent";
|
|||
import { isPlayerPropertyEvent } from "./PlayerPropertyEvent";
|
||||
import type { ChangeZoneEvent } from "./ChangeZoneEvent";
|
||||
import { isColorEvent } from "./ColorEvent";
|
||||
import { isPlayerPosition } from "./PlayerPosition";
|
||||
|
||||
export interface TypedMessageEvent<T> extends MessageEvent {
|
||||
data: T;
|
||||
|
@ -170,6 +171,10 @@ export const iframeQueryMapTypeGuards = {
|
|||
query: tg.isUndefined,
|
||||
answer: tg.isUndefined,
|
||||
},
|
||||
getPlayerPosition: {
|
||||
query: tg.isUndefined,
|
||||
answer: isPlayerPosition,
|
||||
},
|
||||
};
|
||||
|
||||
type GuardedType<T> = T extends (x: unknown) => x is infer T ? T : never;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue