src/interaction/Measure.js
function handleEvent_(evt) {
  if (evt.type != 'pointermove' || evt.dragging) {
    return true;
  }

  const helpMsg = this.sketchFeature === null ? this.startMsg : this.continueMsg;
  if (!helpMsg) {
    throw new Error('Missing helpMsg');
  }

  if (this.displayHelpTooltip_) {
    if (!this.helpTooltipElement_) {
      throw new Error('Missing helpTooltipElement');
    }
    if (!this.helpTooltipOverlay_) {
      throw new Error('Missing helpTooltipOverlay');
    }
    olDom.removeChildren(this.helpTooltipElement_);
    this.helpTooltipElement_.appendChild(helpMsg);
    this.helpTooltipOverlay_.setPosition(evt.coordinate);
  }

  return true;
}
function handleEvent_(evt) {
  if (evt.type != 'pointermove' || evt.dragging) {
    return true;
  }

  const helpMsg = this.sketchFeature === null ? this.startMsg : this.continueMsg;
  if (!helpMsg) {
    throw new Error('Missing helpMsg');
  }

  if (this.displayHelpTooltip_) {
    if (!this.helpTooltipElement_) {
      throw new Error('Missing helpTooltipElement');
    }
    if (!this.helpTooltipOverlay_) {
      throw new Error('Missing helpTooltipOverlay');
    }
    olDom.removeChildren(this.helpTooltipElement_);
    this.helpTooltipElement_.appendChild(helpMsg);
    this.helpTooltipOverlay_.setPosition(evt.coordinate);
  }

  return true;
}
function handleEvent_ ( evt ) { if ( evt . type != 'pointermove' || evt . dragging ) { return true ; } const helpMsg = this . sketchFeature === null ? this . startMsg : this . continueMsg ; if ( ! helpMsg ) { throw new Error ( 'Missing helpMsg' ) ; } if ( this . displayHelpTooltip_ ) { if ( ! this . helpTooltipElement_ ) { throw new Error ( 'Missing helpTooltipElement' ) ; } if ( ! this . helpTooltipOverlay_ ) { throw new Error ( 'Missing helpTooltipOverlay' ) ; } olDom . removeChildren ( this . helpTooltipElement_ ) ; this . helpTooltipElement_ . appendChild ( helpMsg ) ; this . helpTooltipOverlay_ . setPosition ( evt . coordinate ) ; } return true ; }
Handle map browser event.
@param {import("ol/MapBrowserEvent.js").default} evt Map browser event.
@return {boolean} `false` if event propagation should be stopped.
@private
@hidden
@this {Measure}
Handle map browser event .