PDA

View Full Version : Ext.draw.Surface.removeAll() does not remove groups



LesJ
28 Apr 2011, 12:01 PM
I create a surface with two sprites, each in its own group.

I remove all sprites and destroy them. The two groups (group1 and group2) should be removed, but they are still there.


var drawComponent = Ext.create('Ext.draw.Component', {
viewBox: false,
items: [{
type: 'rect',
group: "group1",
x: 10,
y: 10,
width: 25,
height: 50,
stroke: "blue",
"stroke-width": 3,
fill: "yellow",
}, {
type: 'rect',
group: "group2",
x: 50,
y: 60,
width: 20,
height: 60,
stroke: "blue",
"stroke-width": 5,
}]
});

Ext.create('Ext.Window', {
width: 300,
height: 300,
layout: 'fit',
items: [drawComponent]
}).show();

drawComponent.surface.removeAll(true); // destroy

drawComponent.surface.groups