Eric.Sencha
3 Jan 2012, 1:01 PM
Hello,
Can someone point out what i am doing wrong to get a circle to show in a lower vbox panel:
Ext.require( 'Ext.container.Viewport' );
var drawComponent = Ext.create('Ext.draw.Component',
{
viewBox: false
});
Ext.application(
{
name: 'Vertical Box Layout Application',
launch: function()
{
Ext.create('Ext.container.Viewport',
{
layout:
{
id: 'viewport',
type: 'vbox',
align: 'left'
},
items:
[
{
id: 'panelTop',
margins: '0 0 2 0'
},
{
id: 'panelBottom',
margins: '3 0 0 0',
flex: 1,
items:
[
drawComponent
]
}
]
}).show(true);
// Add a circle sprite
var myCircle = drawComponent.surface.add(
{
type: 'circle',
x: 100,
y: 100,
radius: 100,
fill: '#cc5'
}).show(true);
}
});
Thanks. - I don't get an error message in debugger - just no circle.
-Erich
Can someone point out what i am doing wrong to get a circle to show in a lower vbox panel:
Ext.require( 'Ext.container.Viewport' );
var drawComponent = Ext.create('Ext.draw.Component',
{
viewBox: false
});
Ext.application(
{
name: 'Vertical Box Layout Application',
launch: function()
{
Ext.create('Ext.container.Viewport',
{
layout:
{
id: 'viewport',
type: 'vbox',
align: 'left'
},
items:
[
{
id: 'panelTop',
margins: '0 0 2 0'
},
{
id: 'panelBottom',
margins: '3 0 0 0',
flex: 1,
items:
[
drawComponent
]
}
]
}).show(true);
// Add a circle sprite
var myCircle = drawComponent.surface.add(
{
type: 'circle',
x: 100,
y: 100,
radius: 100,
fill: '#cc5'
}).show(true);
}
});
Thanks. - I don't get an error message in debugger - just no circle.
-Erich