How do I make an image its actual size up to a certain point in a window? Extjs 6 classic -
i want have window
xtype contains of own size when show window, shows tiny square in middle of screen (not actual size of image). i've tried using block of code
listeners:{ afterrender: function(me){ me.el.on({ load: function (evt, ele, eopts){ me.updatelayout(); }, error: function(evt,ele,eopts){ } }); } }
to update layout of parent window within image
xtype, makes window not centered , centering window during afterrender
event isn't working. missing simple? have maxwidth
, maxheight
configs of image
set ext.getbody().getviewsize().width
, height
respectively.
sencha had reason not use xtype: 'image'
own icons etc.
xtype: 'image'
works fixed width , height, can't preserve aspect ratio, far know.
what want have container , set background-image of container.
xtype: 'container', style: 'background-image: url(\'image.jpg\'); background-repeat:no-repeat; background-position:50% 50%; background-size:contain'
or use window: https://fiddle.sencha.com/#view/editor&fiddle/244n
Comments
Post a Comment