67805bc7a7
* add random usernames * add username state * add username input * ability to set names * fix tests * set username oon mobile * remove auto generated names * remove commented code * always string * updaate snapshots * maintain username when clearing canvas * Update src/renderer/renderScene.ts Co-Authored-By: Lipis <lipiridis@gmail.com> * add border * fix styles Co-authored-by: Pete Hunt <petehunt@users.noreply.github.com> Co-authored-by: Faustino Kialungila <faustino.kialungila@gmail.com> Co-authored-by: Lipis <lipiridis@gmail.com>
47 lines
1.0 KiB
TypeScript
47 lines
1.0 KiB
TypeScript
import { ExcalidrawTextElement } from "../element/types";
|
|
import { FlooredNumber } from "../types";
|
|
|
|
export type SceneState = {
|
|
scrollX: FlooredNumber;
|
|
scrollY: FlooredNumber;
|
|
// null indicates transparent bg
|
|
viewBackgroundColor: string | null;
|
|
zoom: number;
|
|
shouldCacheIgnoreZoom: boolean;
|
|
remotePointerViewportCoords: { [id: string]: { x: number; y: number } };
|
|
remotePointerButton?: { [id: string]: string | undefined };
|
|
remoteSelectedElementIds: { [elementId: string]: string[] };
|
|
remotePointerUsernames: { [id: string]: string };
|
|
};
|
|
|
|
export type SceneScroll = {
|
|
scrollX: FlooredNumber;
|
|
scrollY: FlooredNumber;
|
|
};
|
|
|
|
export interface Scene {
|
|
elements: ExcalidrawTextElement[];
|
|
}
|
|
|
|
export type ExportType =
|
|
| "png"
|
|
| "clipboard"
|
|
| "clipboard-svg"
|
|
| "backend"
|
|
| "svg";
|
|
|
|
export type ScrollBars = {
|
|
horizontal: {
|
|
x: number;
|
|
y: number;
|
|
width: number;
|
|
height: number;
|
|
} | null;
|
|
vertical: {
|
|
x: number;
|
|
y: number;
|
|
width: number;
|
|
height: number;
|
|
} | null;
|
|
};
|