Eliminate `vm.action` flag in AnnotationController
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.
Showing
Please register or sign in to comment