-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong initialisation #42
Comments
Can you provide me a problem example in codesandbox? |
I'll try, but you can see that behaviour in the live Storybook example as well. https://img-mapper.github.io/react-docs/?path=/story/examples-simple--simple |
I'm also running into this issue. I assumed there was a problem using this in react-grid-layout / react-resizable wrappers and having ImageMapper completing before knowing parent dimensions, but it's interesting that it is happening in the Storybook link as well. First render has 0 height and width. Subsequent renders work as expected. |
In the first render, you will never get the actual height but after the first render, it will get that and present all the things to the screen. |
I am experiencing the same issue. |
Hello I am working on this issue but in the meantime please downgrade the package to v1.3.0, it's working fine. |
i been strugling with the issue too, i fixed this by giving width and hieght props |
i did this and it works
|
Hello @albmat @majilan37 @rafyzg @KeithHubert Resolved in V1.5.0 Please check and free feel to reopen if you found any bugs related to this issue. |
Describe the bug
When the component is initialised, it is not always displayed correctly. The image, the canvas, the map component and the areas are always there, but sometimes neither the div#img-mapper container nor the canvas has any height, so the areas are not displayed, it is as if they were not there. You have to refresh the page to make it work correctly.
Expected behavior
The component should initialise correctly from the beginning, without the need to refresh the page.
Screenshots
Additional context
As you can see in the image, the component is placed inside a container with a grey background, as the content has no height, the coloured container has no height either. Although the image is visible.
The text was updated successfully, but these errors were encountered: