The qx.ui.basic.Image knows about the original image dimension in the
*private* members /__width/ and /__height/. Only derived classes can access
this values by calling the *protected* function /_getContentHint/. The
"loaded" event is fired *too early* (the dimension is not applied so far)
and only for unmanaged Images.
My (and I think I'm not alone) wish list for improvements of the Image
class:
- getter functions for originalWidth and originalHeight
- the "loaded" event should be fired after applying /__width/ and
/__height/
- mayby, if "loaded" event couldn't be moved there can be designed two new
events:
- "dimensionAvailable" : can be fired in /__updateContentHint/
- "dimensionChanged" : can be fired in /__updateContentHint/ only if
width or height changes
(firing the events in /__updateContentHint/ would have the positive side
effect, that the events will be fired for unmanaged AND managed images)
- the image class should have aspect ratio support
Most of the users, trying to get the width and height of the original image,
want to keep aspect ratio. So why don't include this feature in the image
class? Today there are too much workarounds needed to force the image to
keep the aspect ratio.
--
View this message in context:
http://qooxdoo.678.n2.nabble.com/qx-ui-basic-Image-should-be-improved-tp7581533.html
Sent from the qooxdoo mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel