-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Add update functionality to ImageSource objects #4050
Comments
@vastcharade looks like you've got a good chunk of the code written for this image update feature - want to open a PR? |
@ryanbaumann Sorry for the long delay. We'll open a PR when we have some time. That will require making sure our changes are in sync with the master. The lower-level rendering code seems to change fairly regularly, which means it could take a bit of time to sync this. Stay tuned. |
@vastcharade are you still planning to submit a PR? Looks like there are several other devs interested in this feature too. |
Yes please. Very interested in this as it is by far more efficient than switching multiple layers on and off :) |
I hadn't put it on my road map. I may have a slot to do it this week, but it'd be preferable if someone else could give it a go. |
This is a bit beyond me, otherwise, I would help. |
We also need this. |
This would really help our efforts at working with mapd integration. I'd imagine that there are other companies looking at working with mapd or kinetica and having this added would be quite helpful. |
I agree, implementing this will be very useful! |
It would be nice if we had this feature |
Would be really helpful to have a feature like this in the coming future. |
Ya, this feature would be a great addition! |
Would love to have this! |
Motivation
ImageSource objects only have a create mechanism, not an update. So, if you wanted to swap out the image on an image source with a new image, you have to delete the existing source and create a new one. This is inefficient and can result in unwanted popping when re-rendering.
Design Alternatives
Add an update method to ImageSource objects.
Design
Similar to how images are created, the update() method would take as an argument an object with the following optional properties:
Mock-Up
Here's an example of how it would look like in code, based of the documented example:
Concepts
Implementation
Implementation is fairly straightforward as it is similar to addSource(). Care would need to be taken if the image size changes during the update. The following is what it could look like in code (this is based of v0.28.0:
The text was updated successfully, but these errors were encountered: