Inconsistent behaviour of ImageLayer.setSource

8 προβολές
Παράβλεψη και μετάβαση στο πρώτο μη αναγνωσμένο μήνυμα

guille.r...@gmail.com

μη αναγνωσμένη,
21 Νοε 2017, 12:10:46 μ.μ.21/11/17
ως PlayN
Hi all,

I was using ImageLayer.setSource to, well, configure the source for the ImageLayer :) with an image that I was loading using Assets.getRemoteImage(), and I noticed the following:

- If the supplied TileSource is ready when setSource() is called, it will be used regardless of whether it was successfully loaded or in an error state.
- However, if the TileSource it is not ready, once it becomes ready it will only be set if loaded successfully.

This means that for an image that is loaded asynchronusly, the result of calling setSource() depends on the timing.

Guillermo


Michael Bayne

μη αναγνωσμένη,
21 Νοε 2017, 6:27:21 μ.μ.21/11/17
ως pl...@googlegroups.com
Good catch, thanks! I've pushed a fix to that by making the semantics of Image.isLoaded() mean "is successfully loaded" which is what we really wanted anyway.

--

---
You received this message because you are subscribed to the Google Groups "PlayN" group.
To unsubscribe from this group and stop receiving emails from it, send an email to playn+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

guille.r...@gmail.com

μη αναγνωσμένη,
22 Νοε 2017, 3:17:01 μ.μ.22/11/17
ως PlayN
Wow. That was fast!
Απάντηση σε όλους
Απάντηση στον συντάκτη
Προώθηση
0 νέα μηνύματα