aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
diff options
context:
space:
mode:
authorMichael Foiani <sotech117@michaels-mbp-5.devices.brown.edu>2022-06-01 14:01:06 -0400
committerMichael Foiani <sotech117@michaels-mbp-5.devices.brown.edu>2022-06-01 14:01:06 -0400
commit22d39de00ed9a246c520c4c9b1d049a151465d73 (patch)
tree6c1097bed5321bc3a2f218859c9dd8bc018ab259 /src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
parentf792c3573aec834bb5540d1d2ceb4486a92e03ef (diff)
now tracks and replays scaling accurately
Diffstat (limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx')
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
index aa2e0c417..19ae99743 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
@@ -942,6 +942,12 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection
deltaScale = NumCast(this.rootDoc._viewScaleMin, 1) / invTransform.Scale;
}
+ // console.log('zoom scaling', this.zoomScaling())
+ console.log('delta scaling', deltaScale)
+
+ // console.log('transform abt zoomScaling', this.getLocalTransform().inverse().scaleAbout(this.zoomScaling(), x, y));
+
+
const localTransform = this.getLocalTransform().inverse().scaleAbout(deltaScale, x, y);
if (localTransform.Scale >= 0.05 || localTransform.Scale > this.zoomScaling()) {
const safeScale = Math.min(Math.max(0.05, localTransform.Scale), 20);
@@ -966,9 +972,9 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection
@action
setPan(panX: number, panY: number, panTime: number = 0, clamp: boolean = false) {
// set the current respective FFview to the tab being panned.
- Doc.UserDoc()?.presentationMode === 'recording' && RecordingApi.Instance.setRecordingFFView(this);
+ (Doc.UserDoc()?.presentationMode === 'recording') && RecordingApi.Instance.setRecordingFFView(this);
// TODO: make this based off the specific recording FFView
- Doc.UserDoc()?.presentationMode === 'none' && RecordingApi.Instance.setPlayFFView(this);
+ (Doc.UserDoc()?.presentationMode === 'none') && RecordingApi.Instance.setPlayFFView(this);
if (Doc.UserDoc()?.presentationMode === 'watching') {
RecordingApi.Instance.pauseVideoAndMovements();
Doc.UserDoc().presentationMode = 'none';