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

Broken feat.: f.scatters = [] or del(f.scatters[i]) #325

Open
TimoFriedri opened this issue May 6, 2020 · 0 comments
Open

Broken feat.: f.scatters = [] or del(f.scatters[i]) #325

TimoFriedri opened this issue May 6, 2020 · 0 comments

Comments

@TimoFriedri
Copy link
Contributor

Version 0.6.0.a4

Example:

f = ipv.figure()
s = ipv.scatter(*np.random.random([3,10]))
ipv.show()
f.scatters = []
s2 = ipv.scatter(*np.random.random([3,10]), color="blue")
s3 = ipv.scatter(*np.random.random([3,10]), color="green")
del(f.scatters[0])

The scatters will not be removed from the figure!

Looking at the figure.ts file, this should definitely be the case.
updates_scatters() has a remove_from_scene() call, but nothing happens.

Furthermore I think the logic is incorrect for an empty scatters list.
There is only this line [1440] this.scatter_views = {}; but shouldn't there be also the call of remove_from_scene() for each scatter_view beforehand if scatter_views wasn't empty?

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