aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkimdahey <claire_kim1@brown.edu>2020-02-11 21:41:32 -0500
committerkimdahey <claire_kim1@brown.edu>2020-02-11 21:41:32 -0500
commitff268c1440cc4c5553d19524150d6f2d00cbd14c (patch)
tree0a142d077feb75510142a2baa572699488945c2c
parent2131c829b8632a87b8ba52bc311d3b0346eed3f7 (diff)
removed console logs + comments
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx32
1 files changed, 2 insertions, 30 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
index bf517e7c2..5fe5895a8 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
@@ -658,13 +658,11 @@ export class CollectionFreeFormView extends CollectionSubView(PanZoomDocument) {
if (pt1 && pt2) {
const centerX = Math.min(pt1.clientX, pt2.clientX) + Math.abs(pt2.clientX - pt1.clientX) / 2;
const centerY = Math.min(pt1.clientY, pt2.clientY) + Math.abs(pt2.clientY - pt1.clientY) / 2;
- // const screenPoint = this.getTransform().inverse().transformPoint(centerX, centerY);
this._lastX = centerX;
this._lastY = centerY;
const screenBox = this._mainCont?.getBoundingClientRect();
- // console.log(this.props.PanelWidth(), transformed[0]);
// determine if we are using a bezel movement
if (screenBox) {
if ((screenBox.right - centerX) < 100) {
@@ -697,19 +695,15 @@ export class CollectionFreeFormView extends CollectionSubView(PanZoomDocument) {
switch (this._pullDirection) {
case "left":
- console.log('pulled from left');
CollectionDockingView.AddSplit(Docs.Create.FreeformDocument([], { title: "New Collection" }), "left", undefined);
break;
case "right":
- console.log('pulled from right');
CollectionDockingView.AddSplit(Docs.Create.FreeformDocument([], { title: "New Collection" }), "right", undefined);
break;
case "top":
- console.log('pulled from top');
CollectionDockingView.AddSplit(Docs.Create.FreeformDocument([], { title: "New Collection" }), "top", undefined);
break;
case "bottom":
- console.log('pulled from bottom');
CollectionDockingView.AddSplit(Docs.Create.FreeformDocument([], { title: "New Collection" }), "bottom", undefined);
break;
default:
@@ -1129,13 +1123,6 @@ export class CollectionFreeFormView extends CollectionSubView(PanZoomDocument) {
render() {
TraceMobx();
const clientRect = this._mainCont?.getBoundingClientRect();
- // console.log('clientrect has upd8ed', clientRect, this._pullCoords);
- console.log(
- 'left', clientRect ? this._pullDirection === "right" ? this._pullCoords[0] - MainView.Instance.flyoutWidth : clientRect.x - MainView.Instance.flyoutWidth : "auto",
- 'top indicator', clientRect ? this._pullDirection === "bottom" ? this._pullCoords[1] - clientRect.y : clientRect.y - 20 : "auto",
- 'width', clientRect ? this._pullDirection === "left" ? this._pullCoords[0] - clientRect.left : this._pullDirection === "right" ? clientRect.right - this._pullCoords[0] : clientRect.width : 0,
- 'height', clientRect ? this._pullDirection === "top" ? this._pullCoords[1] - clientRect.top : this._pullDirection === "bottom" ? clientRect.bottom - this._pullCoords[1] : clientRect.height : 0);
- console.log(clientRect);
// update the actual dimensions of the collection so that they can inquired (e.g., by a minimap)
// this.Document.fitX = this.contentBounds && this.contentBounds.x;
// this.Document.fitY = this.contentBounds && this.contentBounds.y;
@@ -1162,25 +1149,10 @@ export class CollectionFreeFormView extends CollectionSubView(PanZoomDocument) {
<div className={"pullpane-indicator"}
style={{
display: this._pullDirection ? "block" : "none",
- // width: clientRect ? this._pullDirection === "left" ? this._pullCoords[0] - clientRect.left : this._pullDirection === "right" ? clientRect.right - this._pullCoords[0] : clientRect.width : 0,
- // height: clientRect ? this._pullDirection === "top" ? this._pullCoords[0] - clientRect.top : this._pullDirection === "bottom" ? clientRect.bottom - this._pullCoords[0] : clientRect.height : 0,
- // left: clientRect ? this._pullDirection === "right" ? undefined : clientRect.left : 0,
- // right: clientRect ? this._pullDirection === "left" ? undefined : clientRect.right : 0,
- // top: clientRect ? this._pullDirection === "bottom" ? undefined : clientRect.top : 0,
- // bottom: clientRect ? this._pullDirection === "top" ? undefined : clientRect.bottom : 0,
-
-
-
- // hahahahahahahhahahahaa
-
+ top: clientRect ? this._pullDirection === "bottom" ? this._pullCoords[1] - clientRect.y : 0 : "auto",
+ left: clientRect ? this._pullDirection === "right" ? this._pullCoords[0] - clientRect.x - MainView.Instance.flyoutWidth : 0 : "auto",
width: clientRect ? this._pullDirection === "left" ? this._pullCoords[0] - clientRect.left : this._pullDirection === "right" ? clientRect.right - this._pullCoords[0] : clientRect.width : 0,
height: clientRect ? this._pullDirection === "top" ? this._pullCoords[1] - clientRect.top : this._pullDirection === "bottom" ? clientRect.bottom - this._pullCoords[1] : clientRect.height : 0,
- // left: clientRect ? this._pullDirection === "top" || this._pullDirection === "left" || this._pullDirection === "bottom" ? clientRect.left - MainView.Instance.flyoutWidth : this._pullCoords[0] - clientRect.left : undefined,
- // top: clientRect ? this._pullDirection === "top" || this._pullDirection === "left" ? clientRect.top - 20 : this._pullCoords[1] - clientRect.top : undefined,
-
- // left: x-axis, top: y-axis
- left: clientRect ? this._pullDirection === "right" ? this._pullCoords[0] - clientRect.x - MainView.Instance.flyoutWidth : 0 : "auto",
- top: clientRect ? this._pullDirection === "bottom" ? this._pullCoords[1] - clientRect.y : 0 : "auto",
}}>
</div>