PDA

View Full Version : upgrading from 4.0.2a to 4.1.1a and sprite events stop working



bareflix
19 Oct 2012, 7:14 AM
I have the following code which works with extjs 4.0.2a, but when I run with 4.1.1a, none of the sprite events fire. Any suggestions for what to try?


this.overlay = Ext.create('Ext.draw.Sprite',
{
surface: this.surface,
type: 'circle',
x : this.x,
y : this.y,
zIndex: 20,
fill: "#ffffff",
opacity: 0.5,
radius: this.radius
});
this.overlay.on ("click", this.click, this);
this.overlay.on ("mouseover", this.grow, this);
this.overlay.on ("mouseout", this.shrink, this);

mitchellsimoens
23 Oct 2012, 6:42 AM
They are working for me in 4.1.1


var drawComponent = Ext.create('Ext.draw.Component', {
renderTo : document.body,
viewBox : false,
width : 100,
height : 100,
items : [
{
type : 'circle',
x : 10,
y : 10,
zIndex : 20,
fill : "#ff0000",
opacity : 0.5,
radius : 10,
listeners : {
click : function () {
console.log('click');
},
mouseover : function () {
console.log('mouseover');
},
mouseout : function () {
console.log('mouseout');
}
}
}
]
});