Add cleanup functions for image view
This commit is contained in:
parent
8dbcc85249
commit
3eea1b8369
1 changed files with 2 additions and 0 deletions
|
@ -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 = () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue