for(var i=0; i<this.shapes.length; i++){ if(this.shapes[i]==annotation){ return true; } } this.shapes.push(annotation); return true;