aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanley Yip <stanley_yip@brown.edu>2020-01-08 12:50:56 -0500
committerStanley Yip <stanley_yip@brown.edu>2020-01-08 12:50:56 -0500
commitd8fc218f3481728f221ceacc60ac4bc553f8e295 (patch)
treecad3e497756ec68c9a5be923426c541e488a691e
parentd16636a8246dadb486476fe98da63fc0db4d36dc (diff)
starting something
-rw-r--r--src/client/views/collections/CollectionDockingView.tsx23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx
index 75d92105b..57c59def6 100644
--- a/src/client/views/collections/CollectionDockingView.tsx
+++ b/src/client/views/collections/CollectionDockingView.tsx
@@ -32,6 +32,7 @@ import React = require("react");
import { ButtonSelector } from './ParentDocumentSelector';
import { DocumentType } from '../../documents/DocumentTypes';
import { ComputedField } from '../../../new_fields/ScriptField';
+import { InteractionUtils } from '../../util/InteractionUtils';
library.add(faFile);
const _global = (window /* browser */ || global /* node */) as any;
@@ -493,6 +494,28 @@ export class CollectionDockingView extends React.Component<SubCollectionViewProp
this.AddTab(stack, Docs.Create.FreeformDocument([], { width: this.props.PanelWidth(), height: this.props.PanelHeight(), title: "Untitled Collection" }), undefined);
}
});
+
+ // starter code for bezel to add new pane
+ // stack.element.on("touchstart", (e: TouchEvent) => {
+ // if (e.targetTouches.length === 2) {
+ // let pt1 = e.targetTouches.item(0);
+ // let pt2 = e.targetTouches.item(1);
+ // let threshold = 40 * window.devicePixelRatio;
+ // if (pt1 && pt2 && InteractionUtils.TwoPointEuclidist(pt1, pt2) < threshold) {
+ // let edgeThreshold = 30 * window.devicePixelRatio;
+ // let center = InteractionUtils.CenterPoint([pt1, pt2]);
+ // let stackRect: DOMRect = stack.element.getBoundingClientRect();
+ // let nearLeft = center.X - stackRect.x < edgeThreshold;
+ // let nearTop = center.Y - stackRect.y < edgeThreshold;
+ // let nearRight = stackRect.right - center.X < edgeThreshold;
+ // let nearBottom = stackRect.bottom - center.Y < edgeThreshold;
+ // let ns = [nearLeft, nearTop, nearRight, nearBottom].filter(n => n);
+ // if (ns.length === 1) {
+
+ // }
+ // }
+ // }
+ // });
stack.header.controlsContainer.find('.lm_close') //get the close icon
.off('click') //unbind the current click handler
.click(action(async function () {