• Robert Knight's avatar
    Eliminate `vm.action` flag in AnnotationController · 201e8dd0
    Robert Knight authored
    Instead of maintaining a state flag indicating whether an annotation is
    being viewed, edited or created, derive that state from whether the
    annotation has an ID and whether it has an unsaved draft or not.
    
    In the process this commit simplifies the tests for reverting edits and
    adds a missing test that the annotation is deleted if new when clicking
    the Cancel button.
    201e8dd0
annotation.js 19.3 KB