code: function (evt) {
          if (this.mouseDown && (!this.lastUp || !this.lastUp.equals(evt.xy))) {
              if(this.stoppedDown && this.freehandMode(evt)) {
                  if (this.persist) {
                      this.destroyPersistedFeature();
                  }
                  this.removePoint();
                  this.finalize();
              } else {
                  if (this.passesTolerance(this.lastDown, evt.xy,
                                           this.pixelTolerance)) {
                      if (this.touch) {
                          this.modifyFeature(evt.xy);
                      }
                      if(this.lastUp == null && this.persist) {
                          this.destroyPersistedFeature();
                      }
                      this.addPoint(evt.xy);
                      this.lastUp = evt.xy;
                      if(this.line.geometry.components.length === this.maxVertices + 1) {
                          this.finishGeometry();
                      }
                  }
              }
          }
          this.stoppedDown = this.stopDown;
          this.mouseDown = false;
          return !this.stopUp;
      }
docs: Method: up
  Handle mouseup and touchend.  Send the latest point in the geometry to
  the control. Return determines whether to propagate the event on the map.
  
  Parameters:
  evt - {Event} The browser event
  
  Returns:
  {Boolean} Allow event propagation