Commit 795d9c49 authored by Randall Leeds's avatar Randall Leeds

Lift Annotator global

parent 8a6f7f18
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
......
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment