From 3bcbf32d54af121a84e86c6bd1c99575bfc99859 Mon Sep 17 00:00:00 2001 From: Sophie Zhang Date: Thu, 7 Mar 2024 00:55:02 -0500 Subject: feat: added dropdown for ease function --- .../collectionFreeForm/CollectionFreeFormView.tsx | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx') diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx index 19948b7eb..a62ea2eb9 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx @@ -111,6 +111,13 @@ export class CollectionFreeFormView extends CollectionSubView { + this._presEaseFunc = easeFunc; + }; + public get isAnnotationOverlay() { return this._props.isAnnotationOverlay; } @@ -312,6 +319,12 @@ export class CollectionFreeFormView extends CollectionSubView { + // incorporate the easefunc here + if (options.easeFunc) { + this.setPresEaseFunc(options.easeFunc); + console.log('Ease func', options.easeFunc); + } + if (this._lightboxDoc) return; if (anchor === this.Document) { // if (options.willZoomCentered && options.zoomScale) { @@ -319,6 +332,7 @@ export class CollectionFreeFormView extends CollectionSubView (this.layoutDoc.layout_scrollTop = relTop * maxScrollTop), 10); newPanY = minPanY; } + // updating pan state !this.Document._verticalScroll && (this.Document[this.panXFieldKey] = this.isAnnotationOverlay ? newPanX : panX); !this.Document._horizontalScroll && (this.Document[this.panYFieldKey] = this.isAnnotationOverlay ? newPanY : panY); } @@ -1870,7 +1885,8 @@ export class CollectionFreeFormView extends CollectionSubView {this.props.children ?? null} {/* most likely case of children is document content that's being annoated: eg., an image */} {this.contentViews} -- cgit v1.2.3-70-g09d2