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
e0762fb9
Commit
e0762fb9
authored
Jun 04, 2012
by
Randall Leeds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add comments
parent
30d1e4bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
hypothesis.coffee
hypothesis/js/src/hypothesis.coffee
+5
-0
No files found.
hypothesis/js/src/hypothesis.coffee
View file @
e0762fb9
...
...
@@ -152,6 +152,7 @@ class Hypothesis extends Annotator
showViewer
:
(
annotations
=
[],
detail
=
false
)
->
viewer
=
d3
.
select
(
@
viewer
.
element
.
get
(
0
))
# Thread the messages using JWZ
messages
=
annotations
.
map
(
a
)
->
m
=
mail
.
message
(
null
,
a
.
id
,
a
.
thread
?
.
split
(
'/'
)
or
[])
m
.
annotation
=
a
...
...
@@ -160,11 +161,15 @@ class Hypothesis extends Annotator
root
=
mail
.
messageThread
().
thread
(
messages
)
context
=
viewer
.
datum
(
root
)
# Bind the excerpt data so the excerpt can be removed in the bucket view
# or updated and rendered in the detail view.
excerpts
=
context
.
select
(
'.annotator-listing'
).
selectAll
(
'.hyp-excerpt'
)
.
data
(
->
if
detail
then
root
.
children
else
[]),
(
c
)
->
c
.
message
.
id
if
not
detail
# Remove the excerpts
excerpts
.
exit
().
remove
()
context
=
context
.
select
(
'.annotator-listing'
)
context
.
select
(
'.annotator-listing > li.hyp-excerpt'
).
remove
()
items
=
context
.
selectAll
(
'.annotator-listing > li.hyp-annotation'
)
...
...
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