aboutsummaryrefslogtreecommitdiff
path: root/src/client/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/util')
-rw-r--r--src/client/util/CurrentUserUtils.ts5
-rw-r--r--src/client/util/SelectionManager.ts4
-rw-r--r--src/client/util/type_decls.d1
3 files changed, 10 insertions, 0 deletions
diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts
index b9e62b303..90b43c415 100644
--- a/src/client/util/CurrentUserUtils.ts
+++ b/src/client/util/CurrentUserUtils.ts
@@ -507,6 +507,10 @@ export class CurrentUserUtils {
if (doc.emptyWebpage === undefined) {
doc.emptyWebpage = Docs.Create.WebDocument("http://www.bing.com/", { title: "webpage", _nativeWidth: 850, _height: 512, _width: 400, useCors: true, system: true, cloneFieldFilter: new List<string>(["system"]) });
}
+ if (doc.emptyMap === undefined) {
+ doc.emptyMap = Docs.Create.MapDocument([], { title: "map", _showSidebar: true, _width: 800, _height: 600, system: true, cloneFieldFilter: new List<string>(["system"]) });
+ ((doc.emptyMap as Doc).proto as Doc)["dragFactory-count"] = 0;
+ }
if (doc.activeMobileMenu === undefined) {
this.setupActiveMobileMenu(doc);
}
@@ -526,6 +530,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/SelectionManager.ts b/src/client/util/SelectionManager.ts
index 2cba2c1f2..6674f684d 100644
--- a/src/client/util/SelectionManager.ts
+++ b/src/client/util/SelectionManager.ts
@@ -4,6 +4,7 @@ import { Doc, Opt } from "../../fields/Doc";
import { DocumentType } from "../documents/DocumentTypes";
import { CollectionViewType } from "../views/collections/CollectionView";
import { DocumentView } from "../views/nodes/DocumentView";
+import { CurrentUserUtils } from "./CurrentUserUtils";
export namespace SelectionManager {
@@ -43,6 +44,9 @@ export namespace SelectionManager {
}
@action
DeselectAll(): void {
+ if (CurrentUserUtils.propertiesWidth > 0) {
+ CurrentUserUtils.propertiesWidth = 0;
+ }
manager.SelectedSchemaDocument = undefined;
Array.from(manager.SelectedViews.keys()).map(dv => dv.props.whenChildContentsActiveChanged(false));
manager.SelectedViews.clear();
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;