diff options
Diffstat (limited to 'src/pen-gestures')
| -rw-r--r-- | src/pen-gestures/GestureUtils.ts | 16 | ||||
| -rw-r--r-- | src/pen-gestures/ndollar.ts | 2 |
2 files changed, 5 insertions, 13 deletions
diff --git a/src/pen-gestures/GestureUtils.ts b/src/pen-gestures/GestureUtils.ts index 7a14452c8..955dad5b4 100644 --- a/src/pen-gestures/GestureUtils.ts +++ b/src/pen-gestures/GestureUtils.ts @@ -2,7 +2,9 @@ import { NDollarRecognizer } from "./ndollar"; import { Type } from "typescript"; import { InkField } from "../new_fields/InkField"; import { Docs } from "../client/documents/Documents"; -import { Doc } from "../new_fields/Doc"; +import { Doc, WidthSym, HeightSym } from "../new_fields/Doc"; +import { NumCast } from "../new_fields/Types"; +import { CollectionFreeFormView } from "../client/views/collections/collectionFreeForm/CollectionFreeFormView"; export namespace GestureUtils { namespace GestureDataTypes { @@ -15,21 +17,11 @@ export namespace GestureUtils { export const GestureRecognizer = new NDollarRecognizer(false); - export function GestureOptions(name: Gestures, gestureData: any): (() => any)[] { + export function GestureOptions(name: string, gestureData?: any): (params: {}) => any { switch (name) { case Gestures.Box: - if (gestureData as GestureDataTypes.BoxData) { - return BoxOptions(gestureData as GestureDataTypes.BoxData); - } break; } throw new Error("This means that you're trying to do something with the gesture that hasn't been defined yet. Define it in GestureUtils.ts"); } - - function BoxOptions(gestureData: GestureDataTypes.BoxData): (() => any)[] { - if (gestureData instanceof Array) { - return [() => Docs.Create.FreeformDocument(gestureData as Doc[], {})]; - } - return []; - } }
\ No newline at end of file diff --git a/src/pen-gestures/ndollar.ts b/src/pen-gestures/ndollar.ts index 5d4384202..8c8e079a4 100644 --- a/src/pen-gestures/ndollar.ts +++ b/src/pen-gestures/ndollar.ts @@ -168,7 +168,7 @@ export class NDollarRecognizer { // this.Multistrokes = new Array(NumMultistrokes); this.Multistrokes[0] = new Multistroke(GestureUtils.Gestures.Box, useBoundedRotationInvariance, new Array( - new Array(new Point(30, 146), new Point(30, 222), new Point(106, 225), new Point(106, 146)) + new Array(new Point(30, 146), new Point(30, 222), new Point(106, 225), new Point(106, 146), new Point(30, 146)) )); // |
