-
13 Mar 2012 9:20 AM #1
Answered: Fullscreen image not showing
Answered: Fullscreen image not showing
I'm creating a panel with a titlebar and an image set to fullscreen. The image doesn't show unless it has a fixed height in pixels. Shouldn't fullscreen be enough?
PHP Code:showMap: function(dataview, index, element, record) {
var mapPanel = Ext.create('Ext.Panel', {
id : 'firemapimg',
items : [
{
xtype : 'toolbar',
title : record.get('title'),
docked : 'top'
},
{
xtype : 'image',
src : record.get('src'),
fullscreen : true
}
]
});
Ext.Viewport.animateActiveItem(mapPanel, {type: 'slide', direction: 'left'});
}
-
Best Answer Posted by mitchellsimoens
You shouldn't use fullscreen config if it is a child of another component. Your mapPanel should use fit layout.
-
13 Mar 2012 9:23 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,599
- Vote Rating
- 434
- Answers
- 3102
You shouldn't use fullscreen config if it is a child of another component. Your mapPanel should use fit layout.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
13 Mar 2012 9:27 AM #3
Perfect, thanks.
-
15 May 2012 5:27 PM #4
Didn't work for me

No matter what I do, images only appear if you set a specific height and width.
Code:{ xtype: 'panel', layout: 'fit', items: [ { xtype: 'image', id: 'imgPic', hidden: false, // flex: 1, // width: 250, // height: 250, src:'<snip>' } ] }
-
16 May 2012 4:19 AM #5Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,599
- Vote Rating
- 434
- Answers
- 3102
In that code, as long as the panel has a size the child item will have the same height and width so I suspect the panel doesn't have a size.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
16 May 2012 1:25 PM #6
Resize the image?
Resize the image?
Thanks for the helpful reply!
How does one resize the image? More so, I want it to autofit to its parent toolbar.
Changing the height and width only clips it but doesn't actually resize it.Last edited by nirajanrk; 16 May 2012 at 1:30 PM. Reason: clarification
-
17 May 2012 5:02 AM #7Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,599
- Vote Rating
- 434
- Answers
- 3102
You may want to use the background-size CSS rule on the image component. The image is set as the background of the <div>
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
2 Apr 2013 12:08 AM #8
the flex property of that xtype:'image', will not have any effect unless layout property of the parent container (xtype:'panel') is either 'hbox' or 'vbox' (source)
-
2 Apr 2013 5:02 AM #9Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,599
- Vote Rating
- 434
- Answers
- 3102
No it won't but the parent does have fit layout but should remove flex, width and height configs from the image you are right about that.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
4 Apr 2013 6:32 PM #10


Reply With Quote
