       @_closeHighlight pageNumber
 
       highlightStartPosition = null
+      highlightEndPosition = null
       highlightStartIndex = -1
       highlightEndIndex = -1

        # Mouse went up at the same location that it started, we just cleanup
        @_closeHighlight pageNumber
      else
        @_openHighlight pageNumber, highlightStartIndex, highlightEndIndex

      highlightStartPosition = null
      highlightStartIndex = -1
      highlightEndIndex = -1


      return if highlightStartIndex is -1

      offset = $canvas.offset()
      highlightEndPosition =
        left: e.pageX - offset.left
        top: e.pageY - offset.top
      highlightEndIndex = @_findClosestSegment pageNumber, highlightEndPosition

      return if highlightEndIndex is -1

      @_showHighlight pageNumber, highlightStartPosition, highlightStartIndex, highlightEndPosition, highlightEndIndex

    $canvas.mousedown (e) =>
      offset = $canvas.offset()
