aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionDockingView.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-04-17 01:27:35 -0400
committerBob Zeleznik <zzzman@gmail.com>2019-04-17 01:27:35 -0400
commit9c82d21123aaaa745a33e9dfe8775ef1db73c035 (patch)
treebaac3fb876f838c7cfe50b642db173319e2284fc /src/client/views/collections/CollectionDockingView.tsx
parent21b1e20106ff49c02657c88f503ef46bc7e4fb07 (diff)
small fixes to full screen and context menu on mac
Diffstat (limited to 'src/client/views/collections/CollectionDockingView.tsx')
-rw-r--r--src/client/views/collections/CollectionDockingView.tsx14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx
index b998362f4..2b886adb6 100644
--- a/src/client/views/collections/CollectionDockingView.tsx
+++ b/src/client/views/collections/CollectionDockingView.tsx
@@ -19,6 +19,7 @@ import { ServerUtils } from "../../../server/ServerUtil";
import { DragManager, DragLinksAsDocuments } from "../../util/DragManager";
import { TextField } from "../../../fields/TextField";
import { ListField } from "../../../fields/ListField";
+import { thisExpression } from "babel-types";
@observer
export class CollectionDockingView extends React.Component<SubCollectionViewProps> {
@@ -335,16 +336,23 @@ export class DockedFrameRenderer extends React.Component<DockedFrameProps> {
}
ScreenToLocalTransform = () => {
- let { scale, translateX, translateY } = Utils.GetScreenTransform(this._mainCont.current!);
- return CollectionDockingView.Instance.props.ScreenToLocalTransform().translate(-translateX, -translateY).scale(scale / this._contentScaling());
+ let { scale, translateX, translateY } = Utils.GetScreenTransform(this._mainCont.current!.children[0].firstChild as HTMLElement);
+ let scaling = scale;
+ {
+ let { scale, translateX, translateY } = Utils.GetScreenTransform(this._mainCont.current!);
+ scaling = scale;
+ }
+ return CollectionDockingView.Instance.props.ScreenToLocalTransform().translate(-translateX, -translateY).scale(scaling / this._contentScaling());
}
render() {
if (!this._document) {
return (null);
}
+ let wscale = this._panelWidth / (this._nativeWidth() ? this._nativeWidth() : this._panelWidth);
+ let name = (wscale * this._nativeHeight() > this._panelHeight) ? "" : "-height";
var content =
- <div className="collectionDockingView-content" ref={this._mainCont}>
+ <div className={`collectionDockingView-content${name}`} ref={this._mainCont}>
<DocumentView key={this._document.Id} Document={this._document}
addDocument={undefined}
removeDocument={undefined}