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
49515e57
Commit
49515e57
authored
Aug 27, 2013
by
csillag
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved showViewer and updateViewer out of the bridge plugin
parent
109c1b97
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
22 deletions
+14
-22
host.coffee
h/js/host.coffee
+6
-2
bridge.coffee
h/js/plugin/bridge.coffee
+0
-20
services.coffee
h/js/services.coffee
+8
-0
No files found.
h/js/host.coffee
View file @
49515e57
...
...
@@ -309,8 +309,12 @@ class Annotator.Host extends Annotator
'margin-left'
:
"
#{
m
}
px"
width
:
"
#{
w
}
px"
showViewer
:
(
annotations
)
=>
@
plugins
.
Bridge
.
showViewer
annotations
updateViewer
:
(
annotations
)
=>
@
plugins
.
Bridge
.
updateViewer
annotations
showViewer
:
(
annotations
)
=>
@
panel
?
.
notify
method
:
"showViewer"
,
params
:
(
a
.
id
for
a
in
annotations
)
updateViewer
:
(
annotations
)
=>
@
panel
?
.
notify
method
:
"updateViewer"
,
params
:
(
a
.
id
for
a
in
annotations
)
showEditor
:
(
annotation
)
=>
@
plugins
.
Bridge
.
showEditor
annotation
checkForStartSelection
:
(
event
)
=>
...
...
h/js/plugin/bridge.coffee
View file @
49515e57
...
...
@@ -124,14 +124,6 @@ class Annotator.Plugin.Bridge extends Annotator.Plugin
@
annotator
.
showEditor
(
this
.
_parse
annotation
)
)
.
bind
(
'showViewer'
,
(
ctx
,
annotations
)
=>
@
annotator
.
showViewer
(
this
.
_parse
a
for
a
in
annotations
)
)
.
bind
(
'updateViewer'
,
(
ctx
,
annotations
)
=>
@
annotator
.
updateViewer
(
this
.
_parse
a
for
a
in
annotations
)
)
.
bind
(
'injectAnnotation'
,
(
ctx
,
annotation
)
=>
a
=
this
.
_parse
annotation
...
...
@@ -189,18 +181,6 @@ class Annotator.Plugin.Bridge extends Annotator.Plugin
params
:
this
.
_format
annotation
this
showViewer
:
(
annotations
)
->
@
channel
.
notify
method
:
'showViewer'
params
:
(
this
.
_format
a
for
a
in
annotations
)
this
updateViewer
:
(
annotations
)
->
@
channel
.
notify
method
:
'updateViewer'
params
:
(
this
.
_format
a
for
a
in
annotations
)
this
injectAnnotation
:
(
annotation
)
->
@
channel
.
notify
method
:
'injectAnnotation'
...
...
h/js/services.coffee
View file @
49515e57
...
...
@@ -198,6 +198,14 @@ class Hypothesis extends Annotator
# Pop out the sidebar
$rootScope
.
$apply
=>
this
.
show
())
.
bind
(
'showViewer'
,
(
ctx
,
ids
)
=>
this
.
showViewer
((
@
threading
.
getContainer
id
).
message
for
id
in
ids
)
)
.
bind
(
'updateViewer'
,
(
ctx
,
ids
)
=>
this
.
updateViewer
((
@
threading
.
getContainer
id
).
message
for
id
in
ids
)
)
_setupWrapper
:
->
@
wrapper
=
@
element
.
find
(
'#wrapper'
)
.
on
'mousewheel'
,
(
event
,
delta
)
->
...
...
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