Open bdch1234 opened 2 years ago
Interesting. I didn't know that the existed. I don't see a strong reason not to support it. Though it may be hard to keep track of when a view is no longer displayed?
@martinRenou do you have any thoughts on this?
I'd say my current position is that I would be happy to review a PR implementing this so that we can decide if there are any tradeoffs - but suspect that there's no harm in implementing this.
oh wait, is all we have to set it equal to 0
?
Thanks for opening an issue. I don't think this is specific to ipympl, it seems it has been added in ipywidgets in https://github.com/jupyter-widgets/ipywidgets/pull/1232.
oh wait, is all we have to set it equal to 0?
Probably, there is a check for it to be a number here.
I'd personally say that users of ipympl shouldn't need to access this property (after all it starts with an underscore).
But I actually didn't know this was a thing. We can probably use this to cleanup figures on the backend. What do you think @ianhi ?
But I actually didn't know this was a thing. We can probably use this to cleanup figures on the backend. What do you think @ianhi ?
That’s exactly the use-case I was going for here, but it that would be possible to do directly in ipympl then it would be even better of course
Unfortunately such a logic would break if there are multiple clients.
The trait _view_count does not seem to populate on the canvas (always None). Is it not supported for ipympl?