Inconsistent behaviour of ImageLayer.setSource

瀏覽次數:8 次
跳到第一則未讀訊息

guille.r...@gmail.com

未讀,
2017年11月21日 中午12:10:462017/11/21
收件者: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

未讀,
2017年11月21日 下午6:27:212017/11/21
收件者: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

未讀,
2017年11月22日 下午3:17:012017/11/22
收件者:PlayN
Wow. That was fast!
回覆所有人
回覆作者
轉寄
0 則新訊息