• Sean Hammond's avatar
    Move "Save on Ctrl+Enter" into AnnotationController · 07af0116
    Sean Hammond authored
    Move the DOM event listener function that saves an annotation on
    Ctrl+Enter into AnnotationController. This is just for the sake of
    keeping all the code in one place (in AnnotationController, not in the
    directive's link function) and putting code where it can be tested more
    easily.
    
    Note that the controller's save() function was previously called with
    scope.$evalAsync() and we're now just calling it synchronously. This
    seems to be fine.
    07af0116
annotation.js 21.6 KB