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
febc692b
Commit
febc692b
authored
Jan 24, 2015
by
Gerben
Committed by
Aron Carroll
Feb 04, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small fixes
parent
a161abcc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
annotation-sync.coffee
h/static/scripts/annotation-sync.coffee
+4
-4
cross-frame-bridge.coffee
h/static/scripts/cross-frame-bridge.coffee
+4
-4
No files found.
h/static/scripts/annotation-sync.coffee
View file @
febc692b
...
...
@@ -28,7 +28,7 @@ class AnnotationSync
# association of annotations received in arguments to window-local copies.
cache
:
null
constructor
:
(
options
,
bridge
)
->
constructor
:
(
options
,
@
bridge
)
->
@
options
=
$
.
extend
(
true
,
{},
@
options
,
options
)
@
cache
=
{}
...
...
@@ -41,13 +41,13 @@ class AnnotationSync
this
.
_on
(
event
,
handler
)
# Register remotely invokable methods
for
method
,
func
in
@
_channelListeners
bridge
.
on
(
method
,
func
)
for
method
,
func
of
@
_channelListeners
@
bridge
.
on
(
method
,
func
)
# Upon new connections, send over the items in our cache
onConnect
=
(
channel
)
=>
this
.
_syncCache
(
channel
)
bridge
.
onConnect
(
onConnect
)
@
bridge
.
onConnect
(
onConnect
)
getAnnotationForTag
:
(
tag
)
->
@
cache
[
tag
]
or
null
...
...
h/static/scripts/cross-frame-bridge.coffee
View file @
febc692b
...
...
@@ -84,15 +84,15 @@ class CrossFrameBridge
return
on
:
(
method
,
callback
)
->
@
channelListeners
[
event
]
=
callback
@
channelListeners
[
method
]
=
callback
for
l
in
@
links
l
.
channel
.
bind
event
,
callback
l
.
channel
.
bind
method
,
callback
return
this
off
:
(
method
)
->
for
l
in
@
links
l
.
channel
.
unbind
event
delete
@
channelListeners
[
event
]
l
.
channel
.
unbind
method
delete
@
channelListeners
[
method
]
return
this
# Add a function to be called upon a new connection
...
...
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