-
Notifications
You must be signed in to change notification settings - Fork 22
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
loaded event? #24
Comments
I could wire calling a callback when an image loads, but that code would go in the same place where isLoading is set in the module. |
@bathejasumeet would be cool if I could do something like this though:
So I can do some sort of animation on the image when its loaded. ngAfterViewInit isn't suitable for me. |
Can you know if the isLoading property changed? I get the element with @ViewChild in AfterViewInit, and at that point if I'm downloading an image from the internet I get isLoading == true. That value seems to never change after that, except if I check regularly with setInterval(...) (something I'd prefer no to do...). But I'd like to know if the image ended loading and, for example, stop showing an ActivityIndicator. |
Hi guys, |
Hey @alexandruantonica, I ended up just using the core image-source module and manually triggering garbage collection when the images were no longer needed. This might not be suitable for your use case but there are more details here: NativeScript/NativeScript#3887 |
Agree that a Thanks for this great plugin :) |
I see that there is a
isLoading
property that we can query but is there any sort ofloaded
event that we can use?I need to display two images at exactly the same time. Currently I'm querying
isLoaded
insetInterval
loop and setting the parent elements opacity to 1 when bothisLoaded = true
but this doesn't this doesn't work very well.Even though both images report that they have finished loading they aren't actually both displayed at that point.
Is there any way I can tell when an image has been fully loaded and rendered in the
<IC:WebImage>
element?The text was updated successfully, but these errors were encountered: