aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/GestureOverlay.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-05-10 10:08:50 -0400
committerbobzel <zzzman@gmail.com>2023-05-10 10:08:50 -0400
commitebb846116af9c7e65a9d674c765c71c0bf0a7d29 (patch)
treed8278e7c27f7577eb5b4706604144940d12a718e /src/client/views/GestureOverlay.tsx
parentf912a233a89c8772b22b71d34830ff4b0ba82310 (diff)
parent719da9462f02fd3afda9b0b65de19de9405ab4fc (diff)
Merge branch 'master' into UI_Update_Eric_Ma
Diffstat (limited to 'src/client/views/GestureOverlay.tsx')
-rw-r--r--src/client/views/GestureOverlay.tsx16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/client/views/GestureOverlay.tsx b/src/client/views/GestureOverlay.tsx
index 0feccb742..b04769c1e 100644
--- a/src/client/views/GestureOverlay.tsx
+++ b/src/client/views/GestureOverlay.tsx
@@ -658,9 +658,9 @@ export class GestureOverlay extends Touchable<GestureOverlayProps> {
}
possibilities.push(...wR?.alternates?.map((a: any) => a.recognizedString));
}
- const r = Math.max(this.svgBounds.right, ...this._strokes.map(s => this.getBounds(s).right));
- const l = Math.min(this.svgBounds.left, ...this._strokes.map(s => this.getBounds(s).left));
- const t = Math.min(this.svgBounds.top, ...this._strokes.map(s => this.getBounds(s).top));
+ const r = Math.max(this.svgBounds.right, ...this._strokes.map(s => GestureOverlay.getBounds(s).right));
+ const l = Math.min(this.svgBounds.left, ...this._strokes.map(s => GestureOverlay.getBounds(s).left));
+ const t = Math.min(this.svgBounds.top, ...this._strokes.map(s => GestureOverlay.getBounds(s).top));
// if we receive any word results from cognitive services, display them
runInAction(() => {
@@ -891,7 +891,7 @@ export class GestureOverlay extends Touchable<GestureOverlayProps> {
detail: {
points,
gesture,
- bounds: this.getBounds(points),
+ bounds: GestureOverlay.getBounds(points),
text,
},
})
@@ -899,7 +899,7 @@ export class GestureOverlay extends Touchable<GestureOverlayProps> {
);
};
- getBounds = (stroke: InkData, pad?: boolean) => {
+ public static getBounds = (stroke: InkData, pad?: boolean) => {
const padding = pad ? [-20000, 20000] : [];
const xs = [...padding, ...stroke.map(p => p.X)];
const ys = [...padding, ...stroke.map(p => p.Y)];
@@ -911,7 +911,7 @@ export class GestureOverlay extends Touchable<GestureOverlayProps> {
};
@computed get svgBounds() {
- return this.getBounds(this._points);
+ return GestureOverlay.getBounds(this._points);
}
@computed get elements() {
@@ -1010,14 +1010,12 @@ export class GestureOverlay extends Touchable<GestureOverlayProps> {
renderDepth={0}
styleProvider={returnEmptyString}
docViewPath={returnEmptyDoclist}
- focus={DocUtils.DefaultFocus}
+ focus={emptyFunction}
whenChildContentsActiveChanged={emptyFunction}
bringToFront={emptyFunction}
docRangeFilters={returnEmptyFilter}
docFilters={returnEmptyFilter}
searchFilterDocs={returnEmptyDoclist}
- ContainingCollectionView={undefined}
- ContainingCollectionDoc={undefined}
/>
);
};