Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 3eea1b8

Browse files
committed
Add cleanup functions for image view
1 parent 8dbcc85 commit 3eea1b8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/components/views/elements/ImageView.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ export default class ImageView extends React.Component<IProps, IState> {
114114

115115
componentWillUnmount() {
116116
this.focusLock.current.removeEventListener('wheel', this.onWheel);
117+
window.removeEventListener("resize", this.calculateZoom);
118+
this.image.current.removeEventListener("load", this.calculateZoom);
117119
}
118120

119121
private calculateZoom = () => {

0 commit comments

Comments
 (0)