Commit 6edf26fb authored by Aron Carroll's avatar Aron Carroll

Swap AnnotationUISync methods for toggling annotations

These were the wrong way around.
parent 07db5c12
......@@ -34,13 +34,13 @@ class AnnotationUISync
showAnnotations: (ctx, tags=[]) ->
show()
annotations = getAnnotationsByTags(tags)
annotationUI.xorSelectedAnnotations(annotations)
annotationUI.selectAnnotations(annotations)
focusAnnotations: (ctx, tags=[]) ->
annotations = getAnnotationsByTags(tags)
annotationUI.focusAnnotations(annotations)
toggleAnnotationSelection: (ctx, tags=[]) ->
annotations = getAnnotationsByTags(tags)
annotationUI.selectAnnotations(annotations)
annotationUI.xorSelectedAnnotations(annotations)
setTool: (ctx, name) ->
annotationUI.tool = name
bridge.notify(method: 'setTool', params: name)
......
......@@ -109,8 +109,8 @@ describe 'AnnotationUISync', ->
method: 'showAnnotations',
params: ['tag1', 'tag2', 'tag3']
})
assert.called(fakeAnnotationUI.xorSelectedAnnotations)
assert.calledWith(fakeAnnotationUI.xorSelectedAnnotations, [
assert.called(fakeAnnotationUI.selectAnnotations)
assert.calledWith(fakeAnnotationUI.selectAnnotations, [
{id: 1}, {id: 2}, {id: 3}
])
......@@ -133,8 +133,8 @@ describe 'AnnotationUISync', ->
method: 'toggleAnnotationSelection',
params: ['tag1', 'tag2', 'tag3']
})
assert.called(fakeAnnotationUI.selectAnnotations)
assert.calledWith(fakeAnnotationUI.selectAnnotations, [
assert.called(fakeAnnotationUI.xorSelectedAnnotations)
assert.calledWith(fakeAnnotationUI.xorSelectedAnnotations, [
{id: 1}, {id: 2}, {id: 3}
])
......
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