Commit e8c9f894 authored by csillag's avatar csillag

Re-introduce the local pointer to the Annotator class

Partially revert the changes made in https://github.com/hypothesis/h/commit/c840a620fc040ceb7941c9b50a379b9c271b0728. Fixes #1201.
parent e7adf6b5
......@@ -466,7 +466,7 @@ class Annotator.Guest extends Annotator
# We have to clear the selection.
# (Annotator does this automatically by focusing on
# one of the input fields in the editor.)
Annotator.util.getGlobal().getSelection().removeAllRanges()
@Annotator.util.getGlobal().getSelection().removeAllRanges()
onSetTool: (name) ->
switch name
......
......@@ -36,6 +36,10 @@ class Annotator.Host extends Annotator.Guest
# Scan the document
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) ->
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