Skip to content
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

Quadtree: find does not work because of width / height = 0 #26

Open
olivierchatry opened this issue Sep 22, 2020 · 2 comments
Open

Quadtree: find does not work because of width / height = 0 #26

olivierchatry opened this issue Sep 22, 2020 · 2 comments

Comments

@olivierchatry
Copy link

Hello,

It seems like there is a bit of an issue whit Quadtree class trying to read width and height that it get from the Chart context. These values seems to be bound to clientWidth and clientHeight of the chart component, but for some reason are evaluating to 0.

Seems like this sample also have the same issue :
https://svelte.dev/repl/3eaa39931e8045cf87da8b482e502c29?version=3.26.0

So when the mouse move, the cursor do not update.

It works on the main page, but not on the REPL

@olivierchatry
Copy link
Author

So been debugging a bit, and it seems like the resize event only get trigger at the beggining, and the clientWidth at this moment is 0. I'm guessing it is because my points are empty when I start.

@olivierchatry
Copy link
Author

Yep banco, if I add a if so that the component is only created when I actually have data, then the clientWidth and clientHeight is set correctly and quadtree is able to find data.
Not sure if it can be considered as a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant