Threaded View

  1. #1
    Sencha User
    Join Date
    Aug 2011
    Cincinnati, OH
    Vote Rating
    npenny is on a distinguished road


    Default Centered Issues

    Centered Issues

    I'm trying to display a large image so that it scales down to the height and width of the Container it resides in. This Container is being instantiated in my Viewport, which is a TabPanel.

    Ext.define('App.view.ImagePage', {
        extend: 'Ext.Container',
        alias: 'widget.imagepage',
        config: {
            style: 'background:url("resources/bg-image.jpg")'
        initialize: function() {
            var imagePanel = Ext.create('Ext.Panel', {
                centered: true,
                html: '<img src="resources/imagepage/image.jpg" />'
            console.log('View/ImagePage: Initialized')
    I've attached pictures if you'd like to see. My two problems are:

    1.) Why do I have this space across the bottom of my floating image? It's almost as if there is a padding/margin issue. You can also see the problem if you use 'Ext.Img' instead of 'Ext.Panel':
    var imagePanel = Ext.create('Ext.Img', {
        centered: true,
        mode: 'image',
        style: 'border:5px solid black;',
        src: 'resources/imagepage/image.jpg',
    2.) Also, more importantly, why does using 'centered' align, center and scale the panel perfectly horizontally but NOT vertically? It doesn't seem to scale down when the image's vertical size exceeds the Container's. It does recognize the top edge, but not the bottom. Scrolling is not turned on anywhere. Using 'Ext.Img' instead of 'Ext.Panel' behaves identically.

    Please help. I have tried many different styling solutions, but can't seem to get it perfect. If anyone has a recommendation I'm all ears.
    Last edited by npenny; 13 Jun 2012 at 3:59 PM. Reason: Additional info in Problem 2.

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi