diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/client/util/RecordingApi.ts | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/src/client/util/RecordingApi.ts b/src/client/util/RecordingApi.ts index 3c375f663..b2432af6b 100644 --- a/src/client/util/RecordingApi.ts +++ b/src/client/util/RecordingApi.ts @@ -22,7 +22,7 @@ type Movement = { docId: string, } -type tabReactionFunction = (res : { x: number; y: number; scale: number; key: string; d: any }) => void; +type tabReactionFunction = (res : { x: number; y: number; scale: number; key: string; }) => void; export type Presentation = { @@ -94,7 +94,7 @@ export class RecordingApi { if (this.recordingFFViews.has(key)) { console.warn('addFFViewTest : key already in map'); return; } const disposeFunc = reaction( - () => ({ x: NumCast(doc.panX, -1), y: NumCast(doc.panY, -1), scale: NumCast(doc.viewScale, 0), key: doc[Id], d: doc }), + () => ({ x: NumCast(doc.panX, -1), y: NumCast(doc.panY, -1), scale: NumCast(doc.viewScale, 0), key: doc[Id] }), (res) => reactionFunc(res), ); @@ -350,7 +350,6 @@ export class RecordingApi { Doc.UserDoc().presentationMode = 'watching'; // setup the reaction on tabs that will pause the video if the user interacts with a tab - // this.initTabWatcher((res) => console.log(res)); // TODO: consider this bug at the end of the clip on seek // this.videoBox = videoBox || null; @@ -378,8 +377,7 @@ export class RecordingApi { // TODO: make sure the cahce still hs the id // TODO: if they are open, set them to their first move // this will load the cache, so getCachedRefFields won't have to reach server - let docIds2 = [...docIds]; - DocServer.GetRefFields(docIds2).then(refFields => { + DocServer.GetRefFields([...docIds]).then(refFields => { console.log('refFields', refFields) const openTab = (docId: string) : DocumentView | undefined => { @@ -395,18 +393,6 @@ export class RecordingApi { return DocumentManager.Instance.getDocumentView(doc); } - const views = docIds2.map(docId => openTab(docId)); - const views2 = views.filter(view => view?.ComponentView).map(view => view?.ComponentView as CollectionFreeFormView); - console.log('all views', views, 'allFFviews', views2) - - const disposers = views2.map(ccFFView => { - return reaction(() => ({coords: ccFFView._pullCoords, drag: ccFFView.setPan}), (res) => console.log(res)); - }); - - console.log(disposers) - - - // make timers that will execute each movement at the correct replay time this.timers = filteredMovements.map(movement => { const timeDiff = movement.time - timeViewed * 1000 @@ -420,10 +406,7 @@ export class RecordingApi { 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; - this.removeAllRecordingFFViews(); - } + if (movement === filteredMovements[filteredMovements.length - 1]) RecordingApi.Instance._isPlaying = false; }, timeDiff) }); }) |