From 9ad73769dd2f3a7c6598041f123dfd5cb7ef05d5 Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Tue, 7 Apr 2020 16:00:22 -0400 Subject: fixed some search ui stuff. --- src/client/documents/DocumentTypes.ts | 1 - src/client/documents/Documents.ts | 24 +++++++++++++++++++----- 2 files changed, 19 insertions(+), 6 deletions(-) (limited to 'src/client/documents') diff --git a/src/client/documents/DocumentTypes.ts b/src/client/documents/DocumentTypes.ts index b98e4d581..b6a6cc75a 100644 --- a/src/client/documents/DocumentTypes.ts +++ b/src/client/documents/DocumentTypes.ts @@ -14,7 +14,6 @@ export enum DocumentType { LINKDB = "linkdb", BUTTON = "button", SLIDER = "slider", - EXTENSION = "extension", YOUTUBE = "youtube", WEBCAM = "webcam", FONTICON = "fonticonbox", diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index cc85e5c6f..cca0e7bc6 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -580,11 +580,25 @@ export namespace Docs { } export function InkDocument(color: string, tool: number, strokeWidth: number, points: { X: number, Y: number }[], options: DocumentOptions = {}) { - const doc = InstanceFromProto(Prototypes.get(DocumentType.INK), new InkField(points), options); - doc.color = color; - doc.strokeWidth = strokeWidth; - doc.tool = tool; - return doc; + const I = new Doc(); + I.type = DocumentType.INK; + I.layout = InkingStroke.LayoutString("data"); + I.color = color; + I.strokeWidth = strokeWidth; + I.tool = tool; + I.title = "ink"; + I.x = options.x; + I.y = options.y; + I._width = options._width; + I._height = options._height; + I.data = new InkField(points); + return I; + // return I; + // const doc = InstanceFromProto(Prototypes.get(DocumentType.INK), new InkField(points), options); + // doc.color = color; + // doc.strokeWidth = strokeWidth; + // doc.tool = tool; + // return doc; } export function PdfDocument(url: string, options: DocumentOptions = {}) { -- cgit v1.2.3-70-g09d2