aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/GestureOverlay.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-04-06 14:11:17 -0400
committerGitHub <noreply@github.com>2020-04-06 14:11:17 -0400
commitb3ab8f6413b9bd8b01c23cc8fdb6a6fc61403490 (patch)
treea0d40f5b8dc55f92454a9bf5fa071e9eb4f9f719 /src/client/views/GestureOverlay.tsx
parent43b241a496d446e7b613ad65fb016405009dd532 (diff)
parent490584f292e1da100bbb26ea3be1d06b5f63232d (diff)
Merge pull request #351 from browngraphicslab/nativeWidthProps
Native width props
Diffstat (limited to 'src/client/views/GestureOverlay.tsx')
-rw-r--r--src/client/views/GestureOverlay.tsx13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/client/views/GestureOverlay.tsx b/src/client/views/GestureOverlay.tsx
index a490491ab..f0205133c 100644
--- a/src/client/views/GestureOverlay.tsx
+++ b/src/client/views/GestureOverlay.tsx
@@ -15,7 +15,7 @@ import { Scripting } from "../util/Scripting";
import { FieldValue, Cast, NumCast, BoolCast } from "../../new_fields/Types";
import { CurrentUserUtils } from "../../server/authentication/models/current_user_utils";
import HorizontalPalette from "./Palette";
-import { Utils, emptyPath, emptyFunction, returnFalse, returnOne, returnEmptyString, returnTrue, numberRange } from "../../Utils";
+import { Utils, emptyPath, emptyFunction, returnFalse, returnOne, returnEmptyString, returnTrue, numberRange, returnZero } from "../../Utils";
import { DocumentView } from "./nodes/DocumentView";
import { Transform } from "../util/Transform";
import { DocumentContentsView } from "./nodes/DocumentContentsView";
@@ -695,7 +695,8 @@ export default class GestureOverlay extends Touchable {
</svg>]
];
}
-
+ screenToLocalTransform = () => new Transform(-(this._thumbX ?? 0), -(this._thumbY ?? 0) + this.height, 1);
+ return300 = () => 300;
@action
public openFloatingDoc = (doc: Doc) => {
this._clipboardDoc =
@@ -709,10 +710,12 @@ export default class GestureOverlay extends Touchable {
pinToPres={emptyFunction}
onClick={undefined}
removeDocument={undefined}
- ScreenToLocalTransform={() => new Transform(-(this._thumbX ?? 0), -(this._thumbY ?? 0) + this.height, 1)}
+ ScreenToLocalTransform={this.screenToLocalTransform}
ContentScaling={returnOne}
- PanelWidth={() => 300}
- PanelHeight={() => 300}
+ PanelWidth={this.return300}
+ PanelHeight={this.return300}
+ NativeHeight={returnZero}
+ NativeWidth={returnZero}
renderDepth={0}
backgroundColor={returnEmptyString}
focus={emptyFunction}