remove event listeners

This commit is contained in:
Tainan Felipe 2018-06-14 16:36:22 -03:00
parent 3973b5246d
commit a47fe7bdbc

View File

@ -36,13 +36,6 @@ export default class PresentationOverlay extends Component {
this.getTransformedSvgPoint = this.getTransformedSvgPoint.bind(this); this.getTransformedSvgPoint = this.getTransformedSvgPoint.bind(this);
this.svgCoordinateToPercentages = this.svgCoordinateToPercentages.bind(this); this.svgCoordinateToPercentages = this.svgCoordinateToPercentages.bind(this);
} }
componentDidMount() {
window.addEventListener('beforeunload', this.mouseOutHandler);
}
componentWillUnmount() {
window.removeEventListener('beforeunload', this.mouseOutHandler);
}
// transforms the coordinate from window coordinate system // transforms the coordinate from window coordinate system
// to the main svg coordinate system // to the main svg coordinate system
getTransformedSvgPoint(clientX, clientY) { getTransformedSvgPoint(clientX, clientY) {