 
       startPos = down.position ?= new TimePoint(down.clientX, 'x')
       endPos = new TimePoint(up.clientX, 'x')
+      endPos.clip()
       ruler.selection =
         if startPos.x < endPos.x
           new TimeSegment(startPos, endPos)

          get: ->
            if '_o' of @
              o = @_o
              @_p =
                if isFinite o
                  (o - ruler.range.base) / (ruler.range.u - ruler.range.l)
                else
                  o
            else if '_x' of @
              x = @_x
              tlr = tl.getBoundingClientRect()

            return

      drag: (event, which) ->
        x = new TimePoint(event.clientX, 'x')
        p = this[if which then 'ut' else 'lt'] =
          if which && x.p > 1
            new TimePoint(Infinity)
          else if !which && x.p < 0
            new TimePoint(-Infinity)
          else
            @snapping(x)
        if event.type != 'mousemove'
          $scope.form.position.$setDirty()
        return
