for(var i=0; i<self.selected.length; i++) self.selected[i].setMode(ta.Annotation.Modes.View); self.selected=[];