From 39c6ba3292467979e310f3b577041c2f5e38273f Mon Sep 17 00:00:00 2001 From: bob Date: Tue, 19 Feb 2019 11:33:26 -0500 Subject: fixed selection problem --- src/client/views/collections/CollectionDockingView.tsx | 2 +- src/client/views/collections/CollectionViewBase.tsx | 2 +- src/client/views/nodes/CollectionFreeFormDocumentView.tsx | 2 +- src/client/views/nodes/DocumentView.tsx | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx index 9cc92712e..47ed25fa3 100644 --- a/src/client/views/collections/CollectionDockingView.tsx +++ b/src/client/views/collections/CollectionDockingView.tsx @@ -238,7 +238,7 @@ export class DockedFrameRenderer extends React.Component { ScreenToLocalTransform={() => { let { scale, translateX, translateY } = Utils.GetScreenTransform(this._mainCont.current!); var props = this.props.CollectionDockingView ? this.props.CollectionDockingView.props : CollectionDockingView.Instance.props; - return props.ScreenToLocalTransform().translate(-translateX, -translateY).scale(scale) + return props.ScreenToLocalTransform().translate(-translateX, -translateY).scale(scale / this._parentScaling) }} isTopMost={true} ContainingCollectionView={this.props.CollectionDockingView} /> diff --git a/src/client/views/collections/CollectionViewBase.tsx b/src/client/views/collections/CollectionViewBase.tsx index 5dd10722d..1e20da8d2 100644 --- a/src/client/views/collections/CollectionViewBase.tsx +++ b/src/client/views/collections/CollectionViewBase.tsx @@ -37,7 +37,7 @@ export class CollectionViewBase extends React.Component { } @computed public get active(): boolean { - var isSelected = (this.props.ContainingDocumentView instanceof CollectionFreeFormDocumentView && SelectionManager.IsSelected(this.props.ContainingDocumentView)); + var isSelected = (this.props.ContainingDocumentView && SelectionManager.IsSelected(this.props.ContainingDocumentView)); var childSelected = SelectionManager.SelectedDocuments().some(view => view.props.ContainingCollectionView == this); var topMost = this.props.isTopMost; return isSelected || childSelected || topMost; diff --git a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx index 57527076b..2eb0c5857 100644 --- a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx +++ b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx @@ -92,7 +92,7 @@ export class CollectionFreeFormDocumentView extends React.Component - + ); } diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index d1fd6fb22..f8770f020 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -80,7 +80,6 @@ export class DocumentView extends React.Component { onPointerDown = (e: React.PointerEvent): void => { this._downX = e.clientX; this._downY = e.clientY; - var me = this; if (e.shiftKey && e.buttons === 1) { CollectionDockingView.Instance.StartOtherDrag(this._mainCont.current!, this.props.Document); e.stopPropagation(); -- cgit v1.2.3-70-g09d2