Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
6edf26fb
Commit
6edf26fb
authored
Feb 04, 2015
by
Aron Carroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Swap AnnotationUISync methods for toggling annotations
These were the wrong way around.
parent
07db5c12
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
annotation-ui-sync.coffee
h/static/scripts/annotation-ui-sync.coffee
+2
-2
annotation-ui-sync-test.coffee
tests/js/annotation-ui-sync-test.coffee
+4
-4
No files found.
h/static/scripts/annotation-ui-sync.coffee
View file @
6edf26fb
...
@@ -34,13 +34,13 @@ class AnnotationUISync
...
@@ -34,13 +34,13 @@ class AnnotationUISync
showAnnotations
:
(
ctx
,
tags
=
[])
->
showAnnotations
:
(
ctx
,
tags
=
[])
->
show
()
show
()
annotations
=
getAnnotationsByTags
(
tags
)
annotations
=
getAnnotationsByTags
(
tags
)
annotationUI
.
xorSelected
Annotations
(
annotations
)
annotationUI
.
select
Annotations
(
annotations
)
focusAnnotations
:
(
ctx
,
tags
=
[])
->
focusAnnotations
:
(
ctx
,
tags
=
[])
->
annotations
=
getAnnotationsByTags
(
tags
)
annotations
=
getAnnotationsByTags
(
tags
)
annotationUI
.
focusAnnotations
(
annotations
)
annotationUI
.
focusAnnotations
(
annotations
)
toggleAnnotationSelection
:
(
ctx
,
tags
=
[])
->
toggleAnnotationSelection
:
(
ctx
,
tags
=
[])
->
annotations
=
getAnnotationsByTags
(
tags
)
annotations
=
getAnnotationsByTags
(
tags
)
annotationUI
.
select
Annotations
(
annotations
)
annotationUI
.
xorSelected
Annotations
(
annotations
)
setTool
:
(
ctx
,
name
)
->
setTool
:
(
ctx
,
name
)
->
annotationUI
.
tool
=
name
annotationUI
.
tool
=
name
bridge
.
notify
(
method
:
'setTool'
,
params
:
name
)
bridge
.
notify
(
method
:
'setTool'
,
params
:
name
)
...
...
tests/js/annotation-ui-sync-test.coffee
View file @
6edf26fb
...
@@ -109,8 +109,8 @@ describe 'AnnotationUISync', ->
...
@@ -109,8 +109,8 @@ describe 'AnnotationUISync', ->
method
:
'showAnnotations'
,
method
:
'showAnnotations'
,
params
:
[
'tag1'
,
'tag2'
,
'tag3'
]
params
:
[
'tag1'
,
'tag2'
,
'tag3'
]
})
})
assert
.
called
(
fakeAnnotationUI
.
xorSelected
Annotations
)
assert
.
called
(
fakeAnnotationUI
.
select
Annotations
)
assert
.
calledWith
(
fakeAnnotationUI
.
xorSelected
Annotations
,
[
assert
.
calledWith
(
fakeAnnotationUI
.
select
Annotations
,
[
{
id
:
1
},
{
id
:
2
},
{
id
:
3
}
{
id
:
1
},
{
id
:
2
},
{
id
:
3
}
])
])
...
@@ -133,8 +133,8 @@ describe 'AnnotationUISync', ->
...
@@ -133,8 +133,8 @@ describe 'AnnotationUISync', ->
method
:
'toggleAnnotationSelection'
,
method
:
'toggleAnnotationSelection'
,
params
:
[
'tag1'
,
'tag2'
,
'tag3'
]
params
:
[
'tag1'
,
'tag2'
,
'tag3'
]
})
})
assert
.
called
(
fakeAnnotationUI
.
select
Annotations
)
assert
.
called
(
fakeAnnotationUI
.
xorSelected
Annotations
)
assert
.
calledWith
(
fakeAnnotationUI
.
select
Annotations
,
[
assert
.
calledWith
(
fakeAnnotationUI
.
xorSelected
Annotations
,
[
{
id
:
1
},
{
id
:
2
},
{
id
:
3
}
{
id
:
1
},
{
id
:
2
},
{
id
:
3
}
])
])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment