aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-02-19 20:26:41 -0500
committerBob Zeleznik <zzzman@gmail.com>2019-02-19 20:26:41 -0500
commit7bcdce059eb95a4119181353a77975cc7d8fe392 (patch)
tree2315587be52ac6f60cf1d217e2bbd7dbc7d85809
parent594ac91c42d9f90ebd960a9683a69611c4ad63cb (diff)
fixed transforms and shift dragging docs to make a frame
-rw-r--r--src/client/views/collections/CollectionDockingView.tsx1
-rw-r--r--src/client/views/nodes/DocumentView.tsx5
2 files changed, 6 insertions, 0 deletions
diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx
index 6739416df..ceb638ab4 100644
--- a/src/client/views/collections/CollectionDockingView.tsx
+++ b/src/client/views/collections/CollectionDockingView.tsx
@@ -179,6 +179,7 @@ export class CollectionDockingView extends CollectionViewBase {
this._dragParent!.appendChild(this._dragElement!);
DragManager.Root().removeChild(this._dragDiv);
this._dragDiv = null;
+ this.stateChanged();
}
tab.closeElement.off('click') //unbind the current click handler
.click(function () {
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index ac1996ac5..518add0fc 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -245,6 +245,10 @@ export class DocumentView extends React.Component<DocumentViewProps> {
SelectionManager.SelectDoc(this, ctrlPressed)
}
+ screenToLocalTransform = () => {
+ var parentScrToLocalXf = this.props && this.props.ScreenToLocalTransform ? this.props.ScreenToLocalTransform() : new Transform(0, 0, 1);
+ return parentScrToLocalXf.transform(new Transform(0, 0, this.props ? 1 / this.props.Scaling : 1));
+ }
render() {
let lkeys = this.props.Document.GetT(KeyStore.LayoutKeys, ListField);
if (!lkeys || lkeys === "<Waiting>") {
@@ -278,6 +282,7 @@ export class DocumentView extends React.Component<DocumentViewProps> {
bindings.BackgroundView = backgroundView;
}
+ bindings.ScreenToLocalTransform = this.screenToLocalTransform; // adds 'Scaling' to the screen to local Xf
var width = this.props.Document.GetNumber(KeyStore.NativeWidth, 0);
var strwidth = width > 0 ? width.toString() + "px" : "100%";
var height = this.props.Document.GetNumber(KeyStore.NativeHeight, 0);