jeudi 2 octobre 2014

Ext.Img not showing for layout: auto

Ext.Img is not showing for layout: auto.

It shows when I change layout to card or fit.

Could this be because auto uses height and width of the component but initially component is 0,0 because image is not yet loaded so it remains so even after the image is loaded because when I add width and height to image then it works.

But having to micro manage things like that is not very user friendly. Shouldn't this be done automatically. Does this mean that if some component changes size auto layout will not take this into account?

Also how to I get image exact width and size so that image shows properly?

Code:



Ext.setup({
onReady : function() {

//CREATE CARD VIEW.------------------------------------------
var img = Ext.create('Ext.Img', {
src : 'Fish.png'
});

Ext.create('Ext.Container', {
fullscreen : true,
layout : 'auto',
items : [img]
});

}


});





Ext.Img not showing for layout: auto

Aucun commentaire:

Enregistrer un commentaire