     # that all layers are repainted.
     @setZoom(@scale)
 
-    util.matchElementSize(
-      @containerEl, [@backgroundCanvas, @canvas], @backingScale, =>
+    @loadSnapshot(opts.snapshot) if opts.snapshot
+
+    @isBound = false
+    @bindToElement(containerEl)
+
+  bindToElement: (containerEl) ->
+    if @containerEl
+      console.warn("Trying to bind Literally Canvas to a DOM element more than once is unsupported.")
+      return
+
+    @containerEl = containerEl
+    @_unsubscribeEvents = bindEvents(this, @containerEl, @opts.keyboardShortcuts)
+    @containerEl.style['background-color'] = @colors.background
+    @containerEl.appendChild(@backgroundCanvas)
+    @containerEl.appendChild(@canvas)
+
+    @isBound = true
+
+    repaintAll = =>
         @keepPanInImageBounds()
         @repaintAllLayers()
-    )
+
+    util.matchElementSize(
+      @containerEl, [@backgroundCanvas, @canvas], @backingScale, repaintAll)
 
     if @watermarkImage
       @watermarkImage.onload = => @repaintLayer('background')
 
-    @loadSnapshot(opts.snapshot) if opts.snapshot
+    repaintAll()
 
   _teardown: ->
     @tool.willBecomeInactive(this)
     @tool = null
-    @_unsubscribeEvents()
+    @_unsubscribeEvents?()
 
   trigger: (name, data) ->
     @canvas.dispatchEvent(new CustomEvent(name, detail: data))

      secondary: opts.secondaryColor or '#fff'
      background: opts.backgroundColor or 'transparent'

    @containerEl.style['background-color'] = @colors.background

    @watermarkImage = opts.watermarkImage
    @watermarkScale = opts.watermarkScale or 1

    @backgroundCanvas = document.createElement('canvas')
    @backgroundCtx = @backgroundCanvas.getContext('2d')
    @containerEl.appendChild(@backgroundCanvas)
    @backgroundShapes = opts.backgroundShapes || []

    @_shapesInProgress = []

    @canvas = document.createElement('canvas')
    @canvas.style['background-color'] = 'transparent'
    @containerEl.appendChild(@canvas)

    @buffer = document.createElement('canvas')
    @buffer.style['background-color'] = 'transparent'


module.exports = class LiterallyCanvas

  constructor: (containerEl, opts) ->
    @opts = opts

    @config =
