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
795d9c49
Commit
795d9c49
authored
May 15, 2014
by
Randall Leeds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lift Annotator global
parent
8a6f7f18
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
guest.coffee
h/js/guest.coffee
+3
-1
host.coffee
h/js/host.coffee
+2
-4
No files found.
h/js/guest.coffee
View file @
795d9c49
Annotator
=
@
Annotator
$
=
Annotator
.
$
$
=
Annotator
.
$
class
Annotator
.
Guest
extends
Annotator
class
Annotator
.
Guest
extends
Annotator
# Events to be bound on Annotator#element.
# Events to be bound on Annotator#element.
events
:
events
:
...
@@ -466,7 +468,7 @@ class Annotator.Guest extends Annotator
...
@@ -466,7 +468,7 @@ class Annotator.Guest extends Annotator
# We have to clear the selection.
# We have to clear the selection.
# (Annotator does this automatically by focusing on
# (Annotator does this automatically by focusing on
# one of the input fields in the editor.)
# one of the input fields in the editor.)
@
Annotator
.
util
.
getGlobal
().
getSelection
().
removeAllRanges
()
Annotator
.
util
.
getGlobal
().
getSelection
().
removeAllRanges
()
onSetTool
:
(
name
)
->
onSetTool
:
(
name
)
->
switch
name
switch
name
...
...
h/js/host.coffee
View file @
795d9c49
Annotator
=
@
Annotator
$
=
Annotator
.
$
$
=
Annotator
.
$
class
Annotator
.
Host
extends
Annotator
.
Guest
class
Annotator
.
Host
extends
Annotator
.
Guest
# Drag state variables
# Drag state variables
drag
:
drag
:
...
@@ -36,10 +38,6 @@ class Annotator.Host extends Annotator.Guest
...
@@ -36,10 +38,6 @@ class Annotator.Host extends Annotator.Guest
# Scan the document
# Scan the document
this
.
scanDocument
"Host initialized"
this
.
scanDocument
"Host initialized"
# Save this reference to the Annotator class, so it's available
# later, even if someone has deleted the original reference
@
Annotator
=
Annotator
_setupXDM
:
(
options
)
->
_setupXDM
:
(
options
)
->
channel
=
super
channel
=
super
...
...
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