diff options
author | Michael Foiani <sotech117@michaels-mbp-5.devices.brown.edu> | 2022-06-14 17:13:36 -0400 |
---|---|---|
committer | Michael Foiani <sotech117@michaels-mbp-5.devices.brown.edu> | 2022-06-14 17:13:36 -0400 |
commit | 9e9a49665e7fc914d3faab07ab13aba272bbec3a (patch) | |
tree | b5757072bd402672fa1ec79899f2749c395d5ee4 | |
parent | 844b84bc7440e80252b4892138c47192d4cb0cc1 (diff) |
Correctly hops between free form views.
-rw-r--r-- | src/client/util/RecordingApi.ts | 6 |
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) |