Add basic selection movement
This commit is contained in:
@@ -58,3 +58,8 @@ export type StreamEndEventHandler = (stream: MediaStream) => void;
|
||||
|
||||
export type TimerStartEventHandler = (event: Timer) => void;
|
||||
export type TimerStopEventHandler = () => void;
|
||||
|
||||
export type SelectionItemsChangeEventHandler = (
|
||||
tokenChanges: Record<string, Partial<TokenState>>,
|
||||
noteChanges: Record<string, Partial<Note>>
|
||||
) => void;
|
||||
|
||||
+10
-2
@@ -1,4 +1,3 @@
|
||||
import Konva from "konva";
|
||||
import { RectData, PointsData } from "./Drawing";
|
||||
|
||||
export type SelectToolType = "path" | "rectangle";
|
||||
@@ -7,8 +6,17 @@ export type SelectToolSettings = {
|
||||
type: SelectToolType;
|
||||
};
|
||||
|
||||
export type SelectionItemType = "token" | "note";
|
||||
|
||||
export type SelectionItem = {
|
||||
type: SelectionItemType;
|
||||
id: string;
|
||||
};
|
||||
|
||||
export type BaseSelection = {
|
||||
nodes: Konva.Node[];
|
||||
items: SelectionItem[];
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
|
||||
export type RectSelection = BaseSelection & {
|
||||
|
||||
Reference in New Issue
Block a user