这是ExtJS的形状类:如何将方法添加到ExtJS4中的单例中?
Ext.define('Ext.chart.Shape', {
singleton: true,
circle: function (surface, opts) {
return surface.add(Ext.apply({
type: 'circle',
x: opts.x,
y: opts.y,
stroke: null,
radius: opts.radius
}, opts));
},
...
});
我想一个方法添加到这个类。例如:
myCircle: function (surface, opts) {
return ...
},
我该怎么做?
使用4.1或4.0.x? – 2012-04-20 08:44:24
现在4.0.7。有什么区别? – Natasha 2012-04-20 08:47:24
适用于4.1以及 – 2013-01-29 14:30:51