loadFromStorage();
}
+ // Set focus on text box when you edit an annotation.
+ $(annotations).on('beganEditAnnotation', function(e, a) {
+ $('input[type=text]', a.infoDiv).focus();
+ });
// Demonstration of how to use various other event listeners
$(hairlines).on({
'annotationDeleted': function(e, data) {
console.log('annotation deleted at ', data.series, data.xval);
},
- 'beganEditAnnotation': function(e, data) {
- console.log('began editing annotation at ', data.series, data.xval);
- },
'annotationEdited': function(e, data) {
console.log('edited annotation at ', data.series, data.xval);
},