Sencha surface에서 rect type만 제거하기
const drawContainer = Ext.ComponentQuery.query('#container')[0];const surface = drawContainer.getSurface();// Get all items (sprites) from the surfaceconst items = surface.getItems();// Remove only `rect` type spritesitems.forEach(sprite => { if (sprite.type === 'rect') { surface.remove(sprite, true); // `true` to destroy the sprite }});
2025.01.30