Commit 7cf85396 authored by Randall Leeds's avatar Randall Leeds

Host is in charge of the frame

parent 1a2b0004
......@@ -48,10 +48,6 @@ module.exports = class Guest extends Annotator
# let's load the Document plugin instead.
@options.Document = {}
@frame = $('<div></div>')
.appendTo(@wrapper)
.addClass('annotator-frame annotator-outer annotator-collapsed')
delete @options.app
cfOptions =
......@@ -202,7 +198,6 @@ module.exports = class Guest extends Annotator
$('#annotator-dynamic-style').remove()
@adder.remove()
@frame.remove()
@wrapper.find('.annotator-hl').each ->
$(this).contents().insertBefore(this)
......
......@@ -31,6 +31,10 @@ module.exports = class Host extends Guest
.attr('seamless', '')
.attr('src', src)
@frame = $('<div></div>')
.addClass('annotator-frame annotator-outer annotator-collapsed')
.appendTo(element)
super element, options, dontScan: true
this._addCrossFrameListeners()
......@@ -54,6 +58,10 @@ module.exports = class Host extends Guest
if @frame.hasClass 'annotator-collapsed'
this.showFrame()
destroy: ->
@frame.remove()
super
showFrame: (options={transition: true}) ->
unless @drag.enabled
@frame.css 'margin-left': "#{-1 * @frame.width()}px"
......
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