How to use the basis.dom.event.removeGlobalHandler function in basis

To help you get started, we’ve selected a few basis examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github basisjs / basisjs / src / basis / ui / scroller.js View on Github external
var deltaTime = timeNow - this.lastMotionUpdateTime;
      deltaTime = Math.max(10, deltaTime); // low-timer granularity compensation
      this.lastMotionUpdateTime = 0;

      if (this.scrollX)
      {
        // 100msec is a full hold gesture that complete zeroes out the velocity to be used as inertia
        this.currentVelocityX *= 1 - Math.min(1, Math.max(0, deltaTime / 100));
      }

      if (this.scrollY)
        this.currentVelocityY *= 1 - Math.min(1, Math.max(0, deltaTime / 100));

      Event.removeGlobalHandler('mousemove', this.onMouseMove, this);
      Event.removeGlobalHandler('touchmove', this.onMouseMove, this);
      Event.removeGlobalHandler('mouseup', this.onMouseUp, this);
      Event.removeGlobalHandler('touchend', this.onMouseUp, this);

      if (this.minScrollDeltaXReached || this.minScrollDeltaYReached)
        Event.captureEvent('click', basis.fn.$true);

      this.emit_startInertia();
    },
github lahmatiy / component-inspector / src / inspector / picker / index.js View on Github external
function stopInspect() {
  if (inspectMode.value) {
    domEventUtils.removeGlobalHandler('mousemove', mousemoveHandler);
    domEventUtils.removeGlobalHandler('mousewheel', mouseWheelHandler);
    domEventUtils.removeGlobalHandler('wheel', mouseWheelHandler);
    domEventUtils.removeGlobalHandler('DOMMouseScroll', mouseWheelHandler);
    domEventUtils.removeGlobalHandler('mousedown', domEventUtils.kill);
    domEventUtils.removeGlobalHandler('mouseup', domEventUtils.kill);
    domEventUtils.removeGlobalHandler('contextmenu', contextmenuHandler);
    domEventUtils.removeGlobalHandler('click', pickHandler);

    inspectMode.set(false);
    pickupTarget.set();
  }
}
github lahmatiy / component-inspector / src / inspector-rempl / publisher / picker / index.js View on Github external
function stopInspect() {
  if (inspectMode.value) {
    domEventUtils.removeGlobalHandler('mousemove', mousemoveHandler);
    domEventUtils.removeGlobalHandler('mousewheel', mouseWheelHandler);
    domEventUtils.removeGlobalHandler('wheel', mouseWheelHandler);
    domEventUtils.removeGlobalHandler('DOMMouseScroll', mouseWheelHandler);
    domEventUtils.removeGlobalHandler('mousedown', domEventUtils.kill);
    domEventUtils.removeGlobalHandler('mouseup', domEventUtils.kill);
    domEventUtils.removeGlobalHandler('contextmenu', contextmenuHandler);
    domEventUtils.removeGlobalHandler('click', pickHandler);

    inspectMode.set(false);
    pickupTargetNode.set();
  }
}
github lahmatiy / component-inspector / src / inspector / picker / index.js View on Github external
function stopInspect() {
  if (inspectMode.value) {
    domEventUtils.removeGlobalHandler('mousemove', mousemoveHandler);
    domEventUtils.removeGlobalHandler('mousewheel', mouseWheelHandler);
    domEventUtils.removeGlobalHandler('wheel', mouseWheelHandler);
    domEventUtils.removeGlobalHandler('DOMMouseScroll', mouseWheelHandler);
    domEventUtils.removeGlobalHandler('mousedown', domEventUtils.kill);
    domEventUtils.removeGlobalHandler('mouseup', domEventUtils.kill);
    domEventUtils.removeGlobalHandler('contextmenu', contextmenuHandler);
    domEventUtils.removeGlobalHandler('click', pickHandler);

    inspectMode.set(false);
    pickupTarget.set();
  }
}
github lahmatiy / component-inspector / src / backbone / inspector / template.js View on Github external
function stopInspect(){
  if (inspectMode.value)
  {
    domEventUtils.removeGlobalHandler('mousemove', mousemoveHandler);
    domEventUtils.removeGlobalHandler('mousewheel', mouseWheelHandler);
    domEventUtils.removeGlobalHandler('wheel', mouseWheelHandler);
    domEventUtils.removeGlobalHandler('DOMMouseScroll', mouseWheelHandler);
    domEventUtils.removeGlobalHandler('mousedown');
    domEventUtils.removeGlobalHandler('mouseup');
    domEventUtils.removeGlobalHandler('contextmenu');
    domEventUtils.removeGlobalHandler('click', pickHandler);

    inspectMode.set(false);
    pickupTarget.set();
  }
}
github basisjs / basisjs / src / devpanel / inspector / template.js View on Github external
function stopInspect(){
  if (inspecting)
  {
    domEventUtils.removeGlobalHandler('mousemove', mousemoveHandler);
    domEventUtils.removeGlobalHandler('mousewheel', mouseWheelHandler);
    domEventUtils.removeGlobalHandler('wheel', mouseWheelHandler);
    domEventUtils.removeGlobalHandler('DOMMouseScroll', mouseWheelHandler);
    inspectBasisEvent.releaseEvent('mousedown');
    inspectBasisEvent.releaseEvent('mouseup');
    inspectBasisEvent.releaseEvent('contextmenu');
    inspectBasisEvent.releaseEvent('click');

    inspecting = false;
    pickupTarget.set();
  }
}
github lahmatiy / component-inspector / src / inspector-rempl / publisher / picker / index.js View on Github external
function stopInspect() {
  if (inspectMode.value) {
    domEventUtils.removeGlobalHandler('mousemove', mousemoveHandler);
    domEventUtils.removeGlobalHandler('mousewheel', mouseWheelHandler);
    domEventUtils.removeGlobalHandler('wheel', mouseWheelHandler);
    domEventUtils.removeGlobalHandler('DOMMouseScroll', mouseWheelHandler);
    domEventUtils.removeGlobalHandler('mousedown', domEventUtils.kill);
    domEventUtils.removeGlobalHandler('mouseup', domEventUtils.kill);
    domEventUtils.removeGlobalHandler('contextmenu', contextmenuHandler);
    domEventUtils.removeGlobalHandler('click', pickHandler);

    inspectMode.set(false);
    pickupTargetNode.set();
  }
}
github lahmatiy / component-inspector / src / backbone / inspector / template.js View on Github external
function stopInspect(){
  if (inspectMode.value)
  {
    domEventUtils.removeGlobalHandler('mousemove', mousemoveHandler);
    domEventUtils.removeGlobalHandler('mousewheel', mouseWheelHandler);
    domEventUtils.removeGlobalHandler('wheel', mouseWheelHandler);
    domEventUtils.removeGlobalHandler('DOMMouseScroll', mouseWheelHandler);
    domEventUtils.removeGlobalHandler('mousedown');
    domEventUtils.removeGlobalHandler('mouseup');
    domEventUtils.removeGlobalHandler('contextmenu');
    domEventUtils.removeGlobalHandler('click', pickHandler);

    inspectMode.set(false);
    pickupTarget.set();
  }
}
github basisjs / basisjs / src / devpanel / inspector / common / overlay.js View on Github external
function stopWatch(){
  if (observer)
    observer.disconnect();

  eventUtils.removeGlobalHandler('scroll', updateOnScroll);
  eventUtils.removeGlobalHandler('mousemove', update);
  eventUtils.removeGlobalHandler('pointermove', update);
  eventUtils.removeGlobalHandler('focus', update);
  eventUtils.removeGlobalHandler('focusIn', update);
  eventUtils.removeGlobalHandler('focusOut', update);
  eventUtils.removeGlobalHandler('blur', update);
  eventUtils.removeHandler(global, 'resize', updateOnResize);
  inspectBasisEvent.releaseEvent('contextmenu');
}
github lahmatiy / component-inspector / src / backbone / inspector / template.js View on Github external
function stopInspect(){
  if (inspectMode.value)
  {
    domEventUtils.removeGlobalHandler('mousemove', mousemoveHandler);
    domEventUtils.removeGlobalHandler('mousewheel', mouseWheelHandler);
    domEventUtils.removeGlobalHandler('wheel', mouseWheelHandler);
    domEventUtils.removeGlobalHandler('DOMMouseScroll', mouseWheelHandler);
    domEventUtils.removeGlobalHandler('mousedown');
    domEventUtils.removeGlobalHandler('mouseup');
    domEventUtils.removeGlobalHandler('contextmenu');
    domEventUtils.removeGlobalHandler('click', pickHandler);

    inspectMode.set(false);
    pickupTarget.set();
  }
}