Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.7.2
Description
The docs for the Canvas.imageLoaded signal say that the signal is emitted after the image is loaded. However this does not always seem to be the case. Looking at the code here it looks like the signal is only emitted if the image does not finish loading immediately.
For reference I ran into this case when using an ItemGrabResult url for the image url.
Either the docs should be updated to indicate that the imageLoaded signal may not be emitted in some cases (maybe return true / false from loadImage to indicate synchrous / asynchronous load) or the backend logic should be updated to make sure this signal is always emitted.
As an aside it would be good if the imageLoaded signal passed the url as a parameter so anyone reacting to this signal knows which image has loaded as you may be loading many images and it's not clear which has loaded after each call without manually checking via isImageLoaded or isImageError.