Closed rasvaan closed 8 years ago
Write a function determining the specific target of a annotation, based on annotations.js:
findTarget : function(tag) { result = this.findSpecificTarget(tag); if (result) return result; else return this.findGenericTarget(tag) }, findSpecificTarget : function(tag) { var targets = tag.hasTarget; var target = undefined; if (!targets) return null; if (targets.hasSelector) return targets; for (var t in targets) { target = targets[t]; if (target.hasSelector) return target; } return null; },
Write a function determining the specific target of a annotation, based on annotations.js: