     photo = @puzzle.puzzle_view.photo
     @photo_clip_context.drawImage(photo,xx,yy,@hex_box.width,@hex_box.height,0,0,@hex_box.width,@hex_box.height)
 
-    context = @piece_mask.piece_mask_context
+    @mask = new MissingPiecesMask(app, app.grid)
+    pm_img = document.getElementById("piece-mask")
+    context = pm_img.getContext('2d')
     context.globalCompositeOperation = 'source-atop'
     context.drawImage(@photo_clip,0,0)
     context.globalCompositeOperation = 'source-over'



  construct_piece: (sym) ->
    @sym = sym
    @hexes = @get_hexes()
    @hex_box.set_hex_box(sym)

    @img.width = @hex_box.width
    @img.height = @hex_box.height
    @hexes = @piece.hexes
    context = @img.getContext('2d')
    anchor_a = @hex_box.anchor_hex[0]
    anchor_b = @hex_box.anchor_hex[1]
    anchor_x = 0
    if @hex_box.corner_fit == "high" then anchor_y = 0 else anchor_y = 10
    for hx in @hexes
      aa = hx[0]
      bb = hx[1]
