【发布时间】:2013-05-25 18:25:33
【问题描述】:
我试图在我的自定义视图类中使用 Sencha 的 Ext.draw.Component 绘制一个圆圈,但它没有显示任何圆圈。我已经粘贴了代码以供参考。
我还尝试在我的 Main 类中定义类型组件的变量,但这样做时编译器给出了一个错误,提示类型组件未知。
// 主类
Ext.define('GS0.view.Main', {
extend: 'Ext.tab.Panel',
xtype: 'main',
requires: [
'Ext.TitleBar',
'Ext.Video',
'Ext.Carousel',
'Ext.Container',
'Ext.draw.Component',
'Ext.Img'
],
config: {
tabBarPosition: 'bottom',
items: [
{
iconCls: 'home',
xtype: 'carousel',
ui : 'dark',
direction: 'horizontal',
items: [
{
xtype: 'draw',
type: 'circle',
radius: 50,
x: 100,
y: 100,
fill: '#2d2d2d'
},
{
xtype: 'img',
src: 'images/nm.jpg'
}
]
}
]
}
});
// Circle Class
Ext.define('GS0.view.CC', {
extend: 'Ext.draw.Component',
xtype: 'cc',
config: {
type: 'circle',
cx: 100,
cy: 100,
r: 25,
fillStyle: 'blue'
}
});
【问题讨论】:
标签: html extjs sencha-touch sencha-touch-2.1 sencha-charts