Add cleanup functions for image view

This commit is contained in:
Jaiwanth 2021-05-04 16:42:22 +05:30
parent 8dbcc85249
commit 3eea1b8369

View file

@ -114,6 +114,8 @@ export default class ImageView extends React.Component<IProps, IState> {
componentWillUnmount() {
this.focusLock.current.removeEventListener('wheel', this.onWheel);
window.removeEventListener("resize", this.calculateZoom);
this.image.current.removeEventListener("load", this.calculateZoom);
}
private calculateZoom = () => {