_f4j.js 2.0 KB

123456
  1. // Licensed Materials - Property of IBM
  2. // IBM Cognos Products: rs
  3. // (C) Copyright IBM Corp. 2003, 2022.
  4. // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  5. function _f4j(el, _ttj){this._1tn=el;this._pgj=_ttj;this._1tn.addEventListener(_o7g._ze7?"MSPointerDown":"touchstart", this, false);};_f4j.prototype._fdm=function(){this._1tn.removeEventListener(_o7g._ze7?"MSPointerDown":"touchstart", this, false);this._1tn=null;this._pgj=null;};_f4j.prototype.handleEvent=function(e){switch(e.type){case "MSPointerDown":case "touchstart":this._mqe(e);break;case "MSPointerMove":case "touchmove":this._adg(e);break;case "MSPointerUp":case "touchend":this._swh(e);break;case "MSPointerCancel":case "touchcancel":this._eim=true;this._swh(e);break;}};_f4j.prototype._mqe=function(e){this._eim=false;var _yum=_o7g._ze7?e:e.targetTouches[0];this._vql=_yum.clientX;this._wql=_yum.clientY;this._swe=document.elementFromPoint(this._vql, this._wql);this._1tn.addEventListener(_o7g._ze7?"MSPointerMove":"touchmove", this, false);this._1tn.addEventListener(_o7g._ze7?"MSPointerUp":"touchend", this, false);this._1tn.addEventListener(_o7g._ze7?"MSPointerCancel":"touchcancel", this, false);};_f4j.prototype._adg=function(e){var _yum=_o7g._ze7?e:e.targetTouches[0];if((Math.abs(_yum.clientX-this._vql)>=50)||(Math.abs(_yum.clientY-this._wql)>=50)){this._eim=true;}};_f4j.prototype._swh=function(e){if(!this._eim){var _yum=_o7g._ze7?e:e.changedTouches[0];if(!_4qn._ihk(this._swe, e.target)||(this._swe!=document.elementFromPoint(_yum.clientX, _yum.clientY))){this._eim=true;}}this._1tn.removeEventListener(_o7g._ze7?"MSPointerMove":"touchmove", this, false);this._1tn.removeEventListener(_o7g._ze7?"MSPointerUp":"touchend", this, false);this._1tn.removeEventListener(_o7g._ze7?"MSPointerCancel":"touchcancel", this, false);if(!this._eim){var _yum=_o7g._ze7?e:e.changedTouches[0];this._pgj(this._swe, _yum.clientX, _yum.clientY, e);}this._swe=null;};