_2jl.js 3.9 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. define(["com/ibm/vipr/VIPR","com/ibm/vida/control/vida","_d47"],function(VIPR,_7cn,_d47){"use strict";var _7pc=_7cn.ActionHandler;var _9yf=_7cn.version;function _2jl(_a7m, _u88, _lgc, _axa){this._jsl=_a7m;this._9ub=_lgc;this._6v7=_u88;var _cqd=this._x6g.bind(this);this._im2({_x6g: _cqd, _y3g: _u88._y3g.bind(_u88), _u85: _u88._u85.bind(_u88), _zh8: _u88._zh8.bind(_u88),_w5g: _u88._w5g.bind(_u88)});if(_u88._mt9){this._jsl.properties.on("value", this._ose.bind(this, _u88._mt9.bind(_u88), _axa));}};_2jl.prototype._ose=function(_v4k,_axa,_6um){_vzm._6dm(!this._cej);var _5dk=_6um.property.name;if(_axa[_5dk]){_v4k(_5dk, _6um.property.value, _axa[ _5dk ]);}};_2jl.prototype._x6g=function(_049,_uhc){_vzm._6dm(!this._cej);var _u68=this._jsl.getClientPoint(_uhc);this._6v7._x6g(_049, _u68);};_2jl.prototype._im2=function(_u88){_vzm._6dm(!this._cej);var _6ah=new _d47(_u88);var _jec=new _7pc(this._jsl, _6ah);};_2jl.prototype._lll=function(_l7k){_vzm._6dm(!this._cej);this._jsl.setData(_l7k, _l7k);};_2jl.prototype._wfn=function(){_vzm._6dm(!this._cej);return _dnl._1e8(this._jsl.render("client"));};_2jl.prototype._x87=function(e){_vzm._6dm(!this._cej);var _uhc=this._jsl.getVisCoordinate(e.clientX, e.clientY);if(!_uhc){return null;}return this._jsl.getItemsAtPoint(_uhc);};_2jl.prototype._qg8=function(_n8e,_3vm){_vzm._6dm(!this._cej);return this._jsl.properties.get(_n8e).getValue();};_2jl.prototype._8k8=function(_n8e,_3vm){_vzm._6dm(!this._cej);this._jsl.setProperty(_n8e, _3vm);};_2jl.prototype._fdm=function(){this._cej=true;this._jsl.destroy();};_2jl.prototype._0d7=function(_97m,_1nf){_vzm._6dm(!this._cej);this._wl5(_97m);var _wi3=_97m._x22();for(var _5dk in _wi3){this._jsl.setProperty(_5dk, _wi3[_5dk]);}for(var i=0;i<_1nf.length;i++){var _z9n=_1nf.item(i);var _5dk=_z9n.getAttribute("name");if(_z9n.nodeName=="vizPropertyPaletteValue"||_z9n.nodeName=="vizPropertyCMPaletteValue"){ var _ial=this._9ub[ _z9n.text ];if(!_ial){continue;}if(_5dk=="single_palette"){var _mpg=_97m._gm();if(_mpg){var _f6c=_ial.fills.length;for(var j=0;j<_mpg.length;++j){this._jsl.setProperty(_mpg[ j ], this._9ub[ _z9n.text ].fills[ j % _f6c ]);}}}else{var _z6k;if(_ial.fillType==="simple"){_z6k={"getColor": this._te5.bind(this, _ial)};}else{_z6k={"getColorStops": this._1m2.bind(this, _ial)};}this._jsl.setProperty(_5dk, _z6k);} }else{this._jsl.setProperty(_5dk, _z9n.text);}}};_2jl.prototype._wl5=function(_97m){_vzm._6dm(!this._cej);for(var _5dk in _97m.properties){var _3vm=_97m.properties[_5dk].defaultValue;if(_3vm){this._jsl.setProperty(_5dk, _3vm.value);}}var _v68=_97m.propertyGroups[ _97m.id+"_colorPalette" ]; if(_v68){var _hnj=_v68.properties;for(var i=0; i<_hnj.length;++i){var _5wa=_hnj[ i ].defaultValue;if(_hnj[ i ].name=="single_palette"){var _f6c=_5wa.fills.length;var _xlm=_97m._gm();for(var j=0;j<_xlm.length;j++){this._jsl.setProperty(_xlm[ j ], _5wa.fills[ j % _f6c ]);}continue;}var _z6k;if(_5wa.fillType==="simple"){_z6k={"getColor": this._te5.bind(this, _5wa)};}else{_z6k={"getColorStops": this._1m2.bind(this, _5wa)};}this._jsl.setProperty(_hnj[ i ].name, _z6k);}}};_2jl.prototype._te5=function(_ial,_1vm,_b5k,_fum){ _vzm._6dm(!this._cej);if(_1vm&&_1vm.source){if(_fum<0){var _wan=_ial.fills[_1vm.source._cik()% _ial.fills.length];}else{var _6bn=_1vm.source.getItem(_fum);var _5qm=_6bn._h85()!==null?_6bn._h85():_6bn._m3g();var _wan=_ial.fills[_5qm % _ial.fills.length];}return VIPR.util.Color.fromString(_wan);}else{return VIPR.util.Color.fromString(_ial.fills[ 0 ]);}};_2jl.prototype._1m2=function(_ial,_a,_b){_vzm._6dm(!this._cej);var _8mm=_ial.fills.map(function(_wan){return {at: _wan.at,color: VIPR.util.Color.fromString(_wan.fill)};});_8mm.absolute=false;return {"stops": _8mm,"interpolate": true};};return _2jl;});