remove: function(index, to){ if(index === undefined) index = this.active; if(typeof index == 'string') index = this.getIndexByXid(index); if(typeof to == 'string') to = this.getIndexByXid(to); var length = this.getLength(); if(length>1){ var me = this; this.to(to || 0, function(){ var content = me.contents[index]; justep.Array.remove(me.contents, content); Component.removeComponent(content); }); }else{ var content = this.contents[index]; justep.Array.remove(this.contents, content); Component.removeComponent(content); delete this.active; } },
this.to(to || 0, function(){ var content = me.contents[index]; justep.Array.remove(me.contents, content); Component.removeComponent(content); });