Extjs 触摸Sencha,移除旋转木马而不销毁物品

Extjs 触摸Sencha,移除旋转木马而不销毁物品,extjs,sencha-touch,touch,sencha-touch-2,carousel,Extjs,Sencha Touch,Touch,Sencha Touch 2,Carousel,我搞不清楚,是否有以下可能 我有一个带物品的sencha touch旋转木马。在某个时刻,我想移除/销毁传送带,但不想移除/销毁该传送带中的项目 据我所知,移除和销毁这两个项目也会销毁添加到传送带中的项目 关于解决此问题的任何提示都非常有用。删除方法接受一个参数,以防止销毁删除的项。在您的情况下,您可能需要使用 // save items (not needed, but you probably need to keep a reference for later use) var items

我搞不清楚,是否有以下可能

我有一个带物品的sencha touch旋转木马。在某个时刻,我想移除/销毁传送带,但不想移除/销毁该传送带中的项目

据我所知,移除和销毁这两个项目也会销毁添加到传送带中的项目


关于解决此问题的任何提示都非常有用。

删除方法接受一个参数,以防止销毁删除的项。在您的情况下,您可能需要使用

// save items (not needed, but you probably need to keep a reference for later use)
var items = carousel.getItems();

// empty the carousel before destroying it
carousel.removeAll(false); // destroy set to false

// now you can dispose of the carousel
carousel.destroy();

// then, you'll probably want to add your items to another container...
otherContainer.add(items);