diff options
| author | bobzel <zzzman@gmail.com> | 2025-05-05 12:28:57 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2025-05-05 12:28:57 -0400 |
| commit | 80b07ab9b3e8f1e1bd0f5898177628047254bf25 (patch) | |
| tree | 7063ac333f99a962aa437d78b695318f61f16661 /src/client/views/collections/collectionFreeForm/FaceCollectionBox.tsx | |
| parent | 082ffee0a2757f9e820fc708fceb5b38aca50f0f (diff) | |
| parent | d4659e2bd3ddb947683948083232c26fb1227f39 (diff) | |
Merge branch 'master' into aarav_edit
Diffstat (limited to 'src/client/views/collections/collectionFreeForm/FaceCollectionBox.tsx')
| -rw-r--r-- | src/client/views/collections/collectionFreeForm/FaceCollectionBox.tsx | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/client/views/collections/collectionFreeForm/FaceCollectionBox.tsx b/src/client/views/collections/collectionFreeForm/FaceCollectionBox.tsx index 624c85beb..142085e14 100644 --- a/src/client/views/collections/collectionFreeForm/FaceCollectionBox.tsx +++ b/src/client/views/collections/collectionFreeForm/FaceCollectionBox.tsx @@ -150,11 +150,6 @@ export class UniqueFaceBox extends ViewBoxBaseComponent<FieldViewProps>() { FaceRecognitionHandler.UniqueFaceRemoveFaceImage(imgDoc, this.Document); }, 'remove doc from face'); - /** - * This stops scroll wheel events when they are used to scroll the face collection. - */ - onPassiveWheel = (e: WheelEvent) => e.stopPropagation(); - render() { return ( <div className="face-document-item" ref={ele => this.createDropTarget(ele!)}> @@ -181,12 +176,7 @@ export class UniqueFaceBox extends ViewBoxBaseComponent<FieldViewProps>() { style={{ pointerEvents: this._props.isContentActive() ? undefined : 'none', }} - ref={action((ele: HTMLDivElement | null) => { - this._listRef?.removeEventListener('wheel', this.onPassiveWheel); - this._listRef = ele; - // prevent wheel events from passively propagating up through containers and prevents containers from preventDefault which would block scrolling - ele?.addEventListener('wheel', this.onPassiveWheel, { passive: false }); - })}> + ref={r => this.fixWheelEvents(r, this._props.isContentActive)}> {FaceRecognitionHandler.UniqueFaceImages(this.Document).map((doc, i) => { const [name, type] = ImageCastToNameType(doc?.[Doc.LayoutDataKey(doc)]) ?? ['-missing-', '.png']; return ( |
