Commit 4e6df7c8 authored by Randall Leeds's avatar Randall Leeds

Add annotations to the view when they are created

Fix #504
parent de4b38c5
......@@ -82,6 +82,10 @@ class Hypothesis extends Annotator
for action, roles of annotation.permissions
unless userId in roles then roles.push userId
# Add new annotations to the view when they are created
this.subscribe 'annotationCreated', (a) =>
$rootScope.annotations.unshift a
# Remove annotations from the application when they are deleted
this.subscribe 'annotationDeleted', (a) =>
$rootScope.annotations = $rootScope.annotations.filter (b) -> b isnt a
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment