From 53dfd5f380d8c75fedc967577fb16310d08cefea Mon Sep 17 00:00:00 2001 From: Aubrey-Li <63608597+Aubrey-Li@users.noreply.github.com> Date: Mon, 19 Jul 2021 11:57:22 -0700 Subject: map as node --- src/client/util/CurrentUserUtils.ts | 5 +++++ src/client/util/type_decls.d | 1 + 2 files changed, 6 insertions(+) (limited to 'src/client/util') diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts index 12733e815..21c4ac110 100644 --- a/src/client/util/CurrentUserUtils.ts +++ b/src/client/util/CurrentUserUtils.ts @@ -447,6 +447,10 @@ export class CurrentUserUtils { if (doc.emptyWebpage === undefined) { doc.emptyWebpage = Docs.Create.WebDocument("", { title: "webpage", _nativeWidth: 850, isTemplateDoc: true, _height: 512, _width: 400, useCors: true, system: true, cloneFieldFilter: new List(["system"]) }); } + if (doc.emptyMap === undefined) { + doc.emptyMap = Docs.Create.MapDocument(new List(), { title: "google map", _width: 800, _height: 600, system: true, cloneFieldFilter: new List(["system"]) }); + // ((doc.emptyMap as Doc).proto as Doc)["dragFactory-count"] = 0; + } if (doc.activeMobileMenu === undefined) { this.setupActiveMobileMenu(doc); } @@ -466,6 +470,7 @@ export class CurrentUserUtils { { toolTip: "Tap to create a mobile view in a new pane, drag for a mobile view", title: "Phone", icon: "mobile", click: 'openOnRight(Doc.UserDoc().activeMobileMenu)', drag: 'this.dragFactory', dragFactory: doc.activeMobileMenu as Doc }, { toolTip: "Tap to create a custom header note document, drag for a custom header note", title: "Custom", icon: "window-maximize", click: 'openOnRight(delegateDragFactory(this.dragFactory))', drag: 'delegateDragFactory(this.dragFactory)', dragFactory: doc.emptyHeader as Doc }, { toolTip: "Toggle a Calculator REPL", title: "repl", icon: "calculator", click: 'addOverlayWindow("ScriptingRepl", { x: 300, y: 100, width: 200, height: 200, title: "Scripting REPL" })' }, + { toolTip: "Tap to create a map in the new pane, drag for a map", title: "Map", icon: "map-marker-alt", click: 'openOnRight(copyDragFactory(this.dragFactory))', drag: 'copyDragFactory(this.dragFactory)', dragFactory: doc.emptyMap as Doc, noviceMode: true} ]; } diff --git a/src/client/util/type_decls.d b/src/client/util/type_decls.d index ac0bea46a..9063dc894 100644 --- a/src/client/util/type_decls.d +++ b/src/client/util/type_decls.d @@ -208,6 +208,7 @@ declare const Docs: { PdfDocument(url: string, options?: DocumentOptions): Doc; WebDocument(url: string, options?: DocumentOptions): Doc; HtmlDocument(html: string, options?: DocumentOptions): Doc; + MapDocument(url: string, options?: DocumentOptions): Doc; KVPDocument(document: Doc, options?: DocumentOptions): Doc; FreeformDocument(documents: Doc[], options?: DocumentOptions): Doc; SchemaDocument(columns: string[], documents: Doc[], options?: DocumentOptions): Doc; -- cgit v1.2.3-70-g09d2 From aa67222bc1a80ae11d1a29b32d5cb54199b38011 Mon Sep 17 00:00:00 2001 From: Aubrey-Li <63608597+Aubrey-Li@users.noreply.github.com> Date: Sat, 24 Jul 2021 11:15:04 -0700 Subject: backend issues with creating map node --- deploy/index.html | 2 +- src/client/documents/DocumentTypes.ts | 2 +- src/client/documents/Documents.ts | 4 ++-- src/client/util/CurrentUserUtils.ts | 4 ++-- src/client/views/nodes/PresBox.tsx | 5 +++-- src/fields/Doc.ts | 3 ++- src/fields/URLField.ts | 1 + src/fields/documentSchemas.ts | 2 ++ src/server/ApiManagers/DownloadManager.ts | 2 +- src/server/ApiManagers/SearchManager.ts | 1 + src/server/GarbageCollector.ts | 2 +- src/server/remapUrl.ts | 3 ++- src/server/updateProtos.ts | 2 +- src/server/websocket.ts | 1 + 14 files changed, 21 insertions(+), 13 deletions(-) (limited to 'src/client/util') diff --git a/deploy/index.html b/deploy/index.html index 33cc0906a..a23cbf869 100644 --- a/deploy/index.html +++ b/deploy/index.html @@ -7,7 +7,7 @@ - +