Write a function recording the selectors of the bounding box, based on annotation.js:
addTagFragment : function(tag, update) {
var target = this.findSpecificTarget(tag);
if (! this._anno || !target) return;
var label = tag.title;
var x = target.hasSelector.x;
var y = target.hasSelector.y;
var w = target.hasSelector.w;
var h = target.hasSelector.h;
var torious = {
src: Y.one('img#'+this.get('imageId')).get('src'),
text: label,
targetId: target['@id'],
fieldsId: this.get('fieldsId'),
annotationId: tag.annotation,
shapes: [{
type:'rect',
geometry: { x:x,y:y,width:w,height:h }
}]
};
Write a function recording the selectors of the bounding box, based on annotation.js: