 
   # If there is an block that is being dragged,
   # draw it in gray
-  if @draggingBlock? and @inTree @draggingBlock
+  if @draggingBlock? and @inDisplay @draggingBlock
     @view.getViewNodeFor(@draggingBlock).draw @highlightCtx, new @draw.Rectangle(
       @scrollOffsets.main.x,
       @scrollOffsets.main.y,

class FloatingBlockRecord
  constructor: (@block, @position) ->

Editor::inTree = (block) ->
  if (block instanceof model.List) and not
      (block instanceof model.Container)
    block = block.start

  block = block.container ? block

  until block is @tree or not block?
    block = block.parent

  return block is @tree

# We can create floating blocks by dropping
# blocks without a highlight.

  @clearHighlightCanvas()

  for line, info of @markedLines
    if @inDisplay info.model
      path = @getHighlightPath info.model, info.style
      path.draw @highlightCtx
    else
      delete @markedLines[line]

  for id, info of @markedBlocks
    if @inDisplay info.model
      path = @getHighlightPath info.model, info.style
      path.draw @highlightCtx
    else
      delete @markedLines[id]

  for id, info of @extraMarks
    if @inDisplay info.model
      path = @getHighlightPath info.model, info.style
      path.draw @highlightCtx
    else
