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