code: function ElementPressControlMethod(element, parameter, velocity, friction) {
    if(!element) {
      throw new Error("ElementPressControlMethod: element must be defined");
    }
    if(!parameter) {
      throw new Error("ElementPressControlMethod: parameter must be defined");
    }
    if(!velocity) {
      throw new Error("ElementPressControlMethod: velocity must be defined");
    }
    if(!friction) {
      throw new Error("ElementPressControlMethod: friction must be defined");
    }
  
    this._element = element;
  
    this._pressHandler = this._handlePress.bind(this);
    this._releaseHandler = this._handleRelease.bind(this);
  
    element.addEventListener('mousedown', this._pressHandler);
    element.addEventListener('mouseup', this._releaseHandler);
    element.addEventListener('mouseleave', this._releaseHandler);
    element.addEventListener('touchstart', this._pressHandler);
    element.addEventListener('touchmove', this._releaseHandler);
    element.addEventListener('touchend', this._releaseHandler);
  
    this._parameter = parameter;
    this._velocity = velocity;
    this._friction = friction;
    this._dynamics = new Dynamics();
  
    this._pressing = false;
  }
docs: @class ElementPressControlMethod
  @implements ControlMethod
  @classdesc
  
  Sets the velocity and friction of a single parameter by pressing and
  unpressing a DOM element.
  
  @param {Element} element Element which activates the method when pressed
  @param {string} parameter The parameter to be controlled (e.g. `x`, `y` or `zoom`)
  @param {number} velocity Velocity at which the parameter changes. Use a
  negative number for opposite direction
  @param {number} friction Friction at which the parameter stops