diff --git a/src/component/cursors.vue b/src/component/cursors.vue index 332f00e4..314af02e 100644 --- a/src/component/cursors.vue +++ b/src/component/cursors.vue @@ -17,7 +17,7 @@ import { Vue, Component, Ref, Prop, Watch } from 'vue-property-decorator' import { Cursor, Session } from './types/state' - import { CursorDrawFunction, Dimension } from './types/cursors' + import { InactiveCursorDrawFunction, Dimension } from './types/cursors' const CANVAS_SCALE = 2 @@ -44,7 +44,7 @@ private readonly cursors!: Cursor[] @Prop() - private readonly cursorDraw!: CursorDrawFunction | null + private readonly cursorDraw!: InactiveCursorDrawFunction | null mounted() { // get canvas overlay context diff --git a/src/component/main.vue b/src/component/main.vue index 6856845f..6cc14072 100644 --- a/src/component/main.vue +++ b/src/component/main.vue @@ -10,6 +10,7 @@ :screenSize="state.screen.size" :canvasSize="canvasSize" :cursors="state.cursors.list" + :cursorDraw="inactiveCursorDrawFunction" /> void +import { CursorImage } from './webrtc' + +export type CursorDrawFunction = (ctx: CanvasRenderingContext2D, x: number, y: number, cursorElement: HTMLImageElement, cursorImage: CursorImage, cursorTag: string) => void + +export type InactiveCursorDrawFunction = (ctx: CanvasRenderingContext2D, x: number, y: number, cursorTag: string) => void export interface Dimension { width: number height: number } + +export interface KeyboardModifiers { + capslock: boolean + numlock: boolean +} diff --git a/src/component/types/overlay.ts b/src/component/types/overlay.ts deleted file mode 100644 index 57c1d414..00000000 --- a/src/component/types/overlay.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { CursorImage } from './webrtc' - -export type CursorDrawFunction = (ctx: CanvasRenderingContext2D, x: number, y: number, cursorElement: HTMLImageElement, cursorImage: CursorImage, cursorTag: string) => void - -export interface Dimension { - width: number - height: number -} - -export interface KeyboardModifiers { - capslock: boolean - numlock: boolean -}