aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx
diff options
context:
space:
mode:
authorFawn <fangrui_tong@brown.edu>2019-06-21 13:32:23 -0400
committerFawn <fangrui_tong@brown.edu>2019-06-21 13:32:23 -0400
commitd78c651322ad228152b862eaa378946fe65cc9f9 (patch)
tree08d8e0cbf0d3c19c58689b8e2dbb1025abc83844 /src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx
parentb1a2871fcca57ce934b8613b315a08eede188669 (diff)
dragged links from menu are aliases
Diffstat (limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx')
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx
index ca55b0ff0..65d5ac474 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx
@@ -16,8 +16,10 @@ export interface CollectionFreeFormLinkViewProps {
// removeDocument: (document: Doc) => boolean;
// sameContext: boolean;
- sourceView: DocumentView;
- targetView: DocumentView;
+ // sourceView: DocumentView;
+ // targetView: DocumentView;
+ sourceView: Doc;
+ targetView: Doc;
}
@observer
@@ -49,11 +51,11 @@ export class CollectionFreeFormLinkView extends React.Component<CollectionFreeFo
// let b = this.props.B;
let a1 = this.props.sourceView;
let a2 = this.props.targetView;
- let x1 = NumCast(a1.Document.x) + (BoolCast(a1.Document.isMinimized, false) ? 5 : NumCast(a1.Document.width) / NumCast(a1.Document.zoomBasis, 1) / 2);
- let y1 = NumCast(a1.Document.y) + (BoolCast(a1.Document.isMinimized, false) ? 5 : NumCast(a1.Document.height) / NumCast(a1.Document.zoomBasis, 1) / 2);
+ let x1 = NumCast(a1.x) + (BoolCast(a1.isMinimized, false) ? 5 : NumCast(a1.width) / NumCast(a1.zoomBasis, 1) / 2);
+ let y1 = NumCast(a1.y) + (BoolCast(a1.isMinimized, false) ? 5 : NumCast(a1.height) / NumCast(a1.zoomBasis, 1) / 2);
- let x2 = NumCast(a2.Document.x) + (BoolCast(a2.Document.isMinimized, false) ? 5 : NumCast(a2.Document.width) / NumCast(a2.Document.zoomBasis, 1) / 2);
- let y2 = NumCast(a2.Document.y) + (BoolCast(a2.Document.isMinimized, false) ? 5 : NumCast(a2.Document.height) / NumCast(a2.Document.zoomBasis, 1) / 2);
+ let x2 = NumCast(a2.x) + (BoolCast(a2.isMinimized, false) ? 5 : NumCast(a2.width) / NumCast(a2.zoomBasis, 1) / 2);
+ let y2 = NumCast(a2.y) + (BoolCast(a2.isMinimized, false) ? 5 : NumCast(a2.height) / NumCast(a2.zoomBasis, 1) / 2);
return (
<>