react-image-annotation icon indicating copy to clipboard operation
react-image-annotation copied to clipboard

getBoundingClientRect Error

Open ajaichemmanam opened this issue 6 years ago • 1 comments

I am using the components from src (for customising).

Throws the error

TypeError: Cannot read property 'getBoundingClientRect' of undefined isMouseOverElement ./src/Annotation/utils/isMouseHovering.js:3 1 | import React, { PureComponent as Component } from 'react' 2 |

3 | const isMouseOverElement = ({ elem, e }) => { 4 | const { pageY, pageX } = e 5 | const { left, right, bottom, top } = elem.getBoundingClientRect()

from

src/Annotation/utils/isMouseHovering.js:32 29 | const elem = this.el 30 | 31 | this.setState({

32 | isHoveringOver: isMouseOverElement({ elem, e }) | ^ 33 | }) 34 | } 35 |

I see that v0.9.9 is not updated in github. Was the error fixed in latest one? When I npm install, the package works as expected.

Can you help me with this?

ajaichemmanam avatar Apr 29 '19 17:04 ajaichemmanam

did u get the error resolved? please help getting the same issue

kumarabhishek-github avatar Feb 09 '23 06:02 kumarabhishek-github