_m65.js 5.2 KB

123456
  1. // Licensed Materials - Property of IBM
  2. // IBM Cognos Products: irot
  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 _m65(_pk5, _vl7, _n96, _lh7){this._xu7=true;this._q26=_n96;this._xb7=_lh7;this._0d7=_vl7||null;this._od8=_pk5;this._od8._r15=this;this._v99=_fe9._9h2(this._od8);this._y26=70;this._sp6=70;var _cj7=10;var _dj7=10;this._9g9=this._y26+_cj7+6;this._8g9=(this._sp6+_dj7)-6;this._v26=12;this._4p2=360 / this._v26;this._136=29;this._sq=true;this._c99();this._a99();};_m65._ku7=7;_m65.prototype._xl4=function(){return this._q26;};_m65.prototype._yu5=function(){return this._xb7;};_m65.prototype._hk6=function(_cy7){this._xu7=_cy7;};_m65.prototype._1o8=function(){this._od8.onmousedown=null;this._od8._r15=null;this._od8.innerHTML="";};_m65.prototype._c99=function(){var _hz7=this._od8.appendChild(document.createElement("div"));_hz7.className="clsCCHLClock";this._jf5=_hz7;var _l86=document.createElement("DIV");_l86.className="clsCCHLDivAngleChooserContainer";_l86.style.width="170px";_l86.style.height="190px";_hz7.appendChild(_l86);this._9v7=_l86;var _r86=document.createElement("DIV");_r86.style.position="relative";_l86.appendChild(_r86);this._e26=_r86;var i=0;for(i=0; i<this._v26 ; i++){var _bo1=document.createElement("DIV");_bo1.className="clsCCHLClockDigits";_bo1.id='clockDigits'+this._v99+ i;var _xr=document.createTextNode(i*this._4p2);_bo1.appendChild(_xr);_r86.appendChild(_bo1);}};_m65.prototype._a99=function(){this._cp4();this._034(); this._1c5();};_m65.prototype._cp4=function(){for(var i=0; i<this._v26; i++){var _sf9='clockDigits'+this._v99 +(i);var _dg9=document.getElementById(_sf9);_dg9.style.top=(this._9g9-this._y26*Math.sin(i * this._4p2*Math.PI / 180))+"px";_dg9.style.left=(this._8g9+this._sp6*Math.cos(i * this._4p2*Math.PI / 180))+ "px";}};_m65.prototype._1c5=function(){if(this._gt4){this._gt4.parentNode.removeChild(this._gt4);}if(this._xb7!=null){var _508=this._xb7*Math.PI/180;var _rg9=this._9g9+6;var _ee8=[];for(var i=0; i<this._136; i++){var _vx6=Math.round(this._8g9+i*2*Math.cos(_508)+5);var _qi7=Math.round(_rg9-i*2*Math.sin(_508));_ee8.push(_vx6, _qi7);}var _sl8=_ee8.join("px,");_sl8+= "px";var _429=[ new _oq7(this._8g9+_m65._ku7, _rg9), new _oq7(_ee8[_ee8.length-2]+2, _ee8[_ee8.length-1])];var _3g7=(this._sq==false)?false:true;this._oc8._k88(_429, _3g7, _7i6._kr4, _7i6._8w1, false, 5, this._xb7); if(this._oq6){this._oq6._az8();} if(!this._oq6){this._oq6=new _7i6("EndAngle"+'_canvas', this._y26*2 + this._9g9, this._sp6*2 + this._8g9);}this._oq6._k88(_429, false, _7i6._kr4, _7i6._8w1, true, 5, this._xb7); }};_m65.prototype._034=function(){var _508=this._q26*Math.PI/180;var _ee8=[];var _rg9=this._9g9+6;for(var i=0; i<this._136; i++){var _vx6=Math.round(this._8g9+i*2*Math.cos(_508)+5);var _qi7=Math.round(_rg9-i*2*Math.sin(_508));_ee8.push(_vx6, _qi7);}var _sl8=_ee8.join("px,");_sl8+= "px";if(this._oc8){this._oc8._az8();}if(!this._oc8){this._oc8=new _7i6("Angle" + '_canvas', this._y26*2 + this._9g9, this._sp6*2 + this._8g9, '_m65._bw5(event)');this._oc8._wn8(this._9v7);}var _429=[new _oq7(this._8g9+_m65._ku7,_rg9), new _oq7(_ee8[_ee8.length-2]+2, _ee8[_ee8.length-1])];this._6o6=_429;var _3g7=(this._sq==true)?false:true;this._oc8._k88(_429, _3g7, _7i6._kr4, _7i6._kr4, false, 5);if(this._6h5){this._6h5._az8();} if(!this._6h5){this._6h5=new _7i6("StartAngle"+'_canvas', this._y26*2 + this._9g9, this._sp6*2 + this._8g9);}this._6h5._k88(_429, false, _7i6._kr4, _7i6._kr4, true, 5); };_m65._8y2=function(e){var _p38=_m65._4j3(e);if(_p38&&_p38._xu7){ _p38._sq=true;_p38._a99();}};_m65._r04=function(e){var _p38=_m65._4j3(e);if(_p38&&_p38._xu7){ _p38._sq=false;_p38._a99();}};_m65.prototype._ba5=function(_n96,_lh7){if((this._q26!=_n96)||(this._xb7!=_lh7)){this._q26=_n96;this._xb7=_lh7;this._034();this._1c5();}};_m65._4j3=function(e){var _p38=null;var el=e.target;while(!_p38){if(el._r15){_p38=el._r15;break;}el=el.parentNode;}return _p38;};_m65._bw5=function(e){var _p38=_m65._4j3(e);if(_p38&&_p38._xu7){_p38._106(e);}};_m65.prototype._106=function(e){var topLeft=_fe9._yh2(this._9v7, document.body);var _qg9=e.clientX-topLeft.left;var _rg9=e.clientY-topLeft.top;var _986=this._sq;if(!_986&&this._6h5._ur7(_qg9, _rg9)){this._sq=true; this._a99();return;}if(_986&&this._oq6&&this._oq6._ur7(_qg9, _rg9)){this._sq=false; this._a99();return;}var _mh7=0;if(e.target.className=="clsCCHLClockDigits"){ _mh7=_fe9._485(e.target); }else{_mh7=this._6l2(e);}if(this._sq){ this._ba5(_mh7, this._xb7);}else{this._ba5(this._q26, _mh7); }if(this._0d7&&this._0d7._ks){this._0d7._ks(this);}};_m65.prototype._6l2=function(e){var _mh7=0;var _k96=0;var _bc9=_fe9._yh2(this._od8, document.body);var _v18=e.clientX-_bc9.left;var _w18=e.clientY-_bc9.top;var _ph7=0;var _jh7=0;if(_v18>this._8g9){if(_w18<this._9g9){_ph7=this._9g9-_w18;_jh7=_v18-this._8g9;_k96=Math.atan(_ph7/_jh7);_mh7=_k96/(Math.PI/180);}else{_ph7=_w18-this._9g9;_jh7=_v18-this._8g9;_k96=Math.atan(_ph7/_jh7);_mh7=360-_k96/(Math.PI/180); }}else{if(_w18<this._9g9){_ph7=this._9g9-_w18;_jh7=this._8g9-_v18;_k96=Math.atan(_ph7/_jh7);_mh7=180-_k96/(Math.PI/180);}else{_ph7=_w18-this._9g9;_jh7=this._8g9-_v18;var _l96=Math.atan(_ph7/_jh7);_mh7=180+_l96/(Math.PI/180);}} return _mh7;};