aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/RecordingApi.ts
diff options
context:
space:
mode:
authorMichael Foiani <sotech117@michaels-mbp-5.devices.brown.edu>2022-06-14 17:13:36 -0400
committerMichael Foiani <sotech117@michaels-mbp-5.devices.brown.edu>2022-06-14 17:13:36 -0400
commit9e9a49665e7fc914d3faab07ab13aba272bbec3a (patch)
treeb5757072bd402672fa1ec79899f2749c395d5ee4 /src/client/util/RecordingApi.ts
parent844b84bc7440e80252b4892138c47192d4cb0cc1 (diff)
Correctly hops between free form views.
Diffstat (limited to 'src/client/util/RecordingApi.ts')
-rw-r--r--src/client/util/RecordingApi.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/util/RecordingApi.ts b/src/client/util/RecordingApi.ts
index 44dc4593c..99085e658 100644
--- a/src/client/util/RecordingApi.ts
+++ b/src/client/util/RecordingApi.ts
@@ -280,7 +280,7 @@ export class RecordingApi {
// helper to replay a movement
const document = this.playFFView
let preScale = -1;
- const zoomAndPan = (movement: Movement) => {
+ const zoomAndPan = (movement: Movement, document: CollectionFreeFormView) => {
const { panX, panY, scale } = movement;
(scale !== 0 && preScale !== scale) && document.zoomSmoothlyAboutPt([panX, panY], scale, 0);
document.Document._panX = panX;
@@ -315,9 +315,9 @@ export class RecordingApi {
// open tab if it is not already open
const view = openTab(movement.docId);
// const ffView = view.CollectionFreeFormDocumentView?.().props.CollectionFreeFormView;
- console.log('dview', view, 'ffView', view?.props)
+ const collectionFFView = view?.ComponentView;
// replay the movement
- zoomAndPan(movement);
+ zoomAndPan(movement, collectionFFView as CollectionFreeFormView);
// if last movement, presentation is done -> set the instance var
if (movement === filteredMovements[filteredMovements.length - 1]) RecordingApi.Instance._isPlaying = false;
}, timeDiff)