Results 1 to 3 of 3

Thread: Ext.Img component: sizing does not actually size specified image.

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Jan 2011
    Posts
    19
    Vote Rating
    0
      0  

    Default Ext.Img component: sizing does not actually size specified image.

    It looks like the Img component takes the supplied image and makes it the background-image for an Panel. Since this is the case, scaling of the image cannot be forced. When specifying a width and height, it should apply to the background-size attribute of the Panel.

    I was assuming the following options:
    Code:
    scaling: 'contain' or 'cover'
    height: 500 
    width: 500
    which all, of course, would be added to the Panel's background-size attribute.

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Vote Rating
    1272
      0  

    Default

    If you set mode : 'image' on the Ext.Img then it will act the way you wish. Or if you want to leave it as default then you can use this CSS:

    Code:
    .x-img {
        background-size: 100%;
    }
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Touch Premium Member
    Join Date
    Jun 2008
    Location
    Germany, Dortmund
    Posts
    249
    Vote Rating
    16
      0  

    Default

    Hi Mitchell,
    it would be great to see all used properties in the api doc also (not only investigating source code).

    That would make live a little bit easier.

    Maybe this are hidden gems for experienced developers that like sources but it is good to know that there is always one person who knows them all ;-)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •