我在Extjs4.2中的图表上创建了一个精灵项目,我想捕捉这个精灵项目的鼠标事件。但我不了解这些事件。
有什么想法吗?
var redcircle = Ext.create('Ext.draw.Sprite', {
type: 'circle',
radius: 10,
fill: '#f00',
x: 10,
y: 10,
listeners: {
'mouseover': function (args) {
alert('Mouse over')
}
},
group: 'circles',
surface: surface
}).show(true);发布于 2015-01-07 01:23:15
我已经做了一个例子,它在我这一端是有效的
Ext.onReady(function () {
Ext.create('Ext.draw.Component', {
renderTo: Ext.getBody(),
width: 200,
height: 200,
items: [{
type: 'circle',
radius: 90,
x: 100,
y: 100,
fill: 'blue',
listeners:{
mouseover:function( e, t, eOpts ){
alert("Mouse Over");
}
}
}]
});
});https://stackoverflow.com/questions/27801025
复制相似问题