From 2a313f28fcb8675223708b0657de7517a3281095 Mon Sep 17 00:00:00 2001 From: bobzel Date: Wed, 17 Apr 2024 12:27:21 -0400 Subject: restoring eslint - updates not complete yet --- src/pen-gestures/GestureUtils.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/pen-gestures/GestureUtils.ts') diff --git a/src/pen-gestures/GestureUtils.ts b/src/pen-gestures/GestureUtils.ts index 41917aac9..28323d62f 100644 --- a/src/pen-gestures/GestureUtils.ts +++ b/src/pen-gestures/GestureUtils.ts @@ -1,32 +1,32 @@ import { Rect } from 'react-measure'; -import { PointData } from '../fields/InkField'; +import { Gestures, PointData } from './GestureTypes'; import { NDollarRecognizer } from './ndollar'; export namespace GestureUtils { export class GestureEvent { - constructor(readonly gesture: Gestures, readonly points: PointData[], readonly bounds: Rect, readonly text?: any) {} + readonly gesture: Gestures; + readonly points: PointData[]; + readonly bounds: Rect; + readonly text?: any; + + constructor(gesture: Gestures, points: PointData[], bounds: Rect, text?: any) { + this.gesture = gesture; + this.points = points; + this.bounds = bounds; + this.text = text; + } } export interface GestureEventDisposer { (): void; } + // eslint-disable-next-line no-undef export function MakeGestureTarget(element: HTMLElement, func: (e: Event, ge: GestureEvent) => void): GestureEventDisposer { const handler = (e: Event) => func(e, (e as CustomEvent).detail); element.addEventListener('dashOnGesture', handler); return () => element.removeEventListener('dashOnGesture', handler); } - export enum Gestures { - Line = 'line', - Stroke = 'stroke', - Scribble = 'scribble', - Text = 'text', - Triangle = 'triangle', - Circle = 'circle', - Rectangle = 'rectangle', - Arrow = 'arrow', - } - export const GestureRecognizer = new NDollarRecognizer(false); } -- cgit v1.2.3-70-g09d2