// JenScript - 1.3.2 2017-06-10 // http://jenscript.io - Copyright 2017 Sébastien Janaud. All Rights reserved !function(){JenScript.SymbolFiller={createGlue:function(){try{var a=new JenScript.SymbolComponent({});return a.setName("SymbolComponent.Glue"),a.setFillerType("Glue"),a.setOpaque(!1),a.setFiller(!0),a}catch(b){console.log("error : "+b)}return void 0},createStrut:function(a){try{var b=new JenScript.SymbolComponent({});return b.setName("SymbolComponent.Strut."+b),b.setOpaque(!1),b.setThickness(a),b.setFillerType("Strut"),b.setFiller(!0),b}catch(c){console.log("error : "+c)}return void 0}},JenScript.SymbolComponent=function(a){this.init(a)},JenScript.Model.addMethods(JenScript.SymbolComponent,{init:function(a){a=a||{},this.Id="Symbol"+JenScript.sequenceId++,this.isFiller=!1,this.fillerType,this.layer,this.nature,this.opaque,this.thickness=void 0!==a.thickness?a.thickness:0,this.themeColor=void 0!==a.themeColor?a.themeColor:"gray",this.name=a.name,this.host,this.lockEnter=!1,this.visible=!0,this.opacity=void 0!==a.opacity?a.opacity:1,this.userObject=a.userObject,this.bound2D},getThemeColor:function(){return this.themeColor},setThemeColor:function(a){this.themeColor=a},toString:function(){return"SymbolComponent:"+this.Id},equals:function(a){return void 0===a?!1:void 0===a.Id?!1:a.Id===this.Id},getLayer:function(){return this.layer},setLayer:function(a){this.layer=a},getBound2D:function(){return this.bound2D},setBound2D:function(a){this.bound2D=a},setFiller:function(a){this.isFiller=a},getFillerType:function(){return this.fillerType},setFillerType:function(a){this.fillerType=a},getHost:function(){return this.host},setHost:function(a){this.host=a},getName:function(){return null==name&&(name=null!=getLayer()?getClass().getSimpleName()+"_"+getLayer().getSymbolIndex(this):getClass().getSimpleName()),name},setName:function(a){this.name=a},getThickness:function(){return this.thickness},setThickness:function(a){this.thickness=a},isOpaque:function(){return this.opaque},setOpaque:function(a){this.opaque=a},getLocationX:function(){if(void 0===this.layer)return 0;if("Horizontal"===this.nature)throw new Error("Horizontal symbol has no location x");return this.layer.getComponentXLocation(this)},getCenterX:function(){return null==this.layer?0:this.getLocationX()+this.getThickness()/2},getLocationY:function(){if(void 0===this.layer)return 0;if("Vertical"==this.nature)throw new Error("Vertical symbol has no location y");return this.layer.getComponentYLocation(this)},getCenterY:function(){return void 0===this.layer?0:this.getLocationY()+this.getThickness()/2},getNature:function(){return this.nature},setNature:function(a){this.nature=a},isLockEnter:function(){return this.lockEnter},setLockEnter:function(a){this.lockEnter=a},isVisible:function(){return this.visible},setVisible:function(a){this.visible=a},getUserObject:function(){return this.userObject},setUserObject:function(a){this.userObject=a}})}(),function(){JenScript.SymbolBar=function(a){this._init(a)},JenScript.Model.inheritPrototype(JenScript.SymbolBar,JenScript.SymbolComponent),JenScript.Model.addMethods(JenScript.SymbolBar,{_init:function(a){a=a||{},this.value=a.value,this.base=a.base,this.setBase(this.base),this.morpheStyle=void 0!==a.morpheStyle?a.morpheStyle:"Rectangle",this.symbol=void 0!==a.symbol?a.symbol:"Unamed Bar Symbol",this.round=void 0!==a.round?a.round:5,this.direction=void 0!==a.direction?a.direction:"ascent",this.ascent=!1,this.descent=!1,"descent"===this.direction?this.setDescentValue(this.value):this.setAscentValue(this.value),this.barStroke=a.barStroke,this.barFill=void 0!==a.barFill?a.barFill:new JenScript.SymbolBarFill0({}),this.barEffect=a.barEffect,this.barLabel,this.axisLabel,this.barShape,this.part,this.inflating=!1,this.deflating=!1,this.inflate,this.deflate,JenScript.SymbolComponent.call(this,a)},getBarLabel:function(){return this.barLabel},setBarLabel:function(a){this.barLabel=a},getAxisLabel:function(){return this.axisLabel},setAxisLabel:function(a){this.axisLabel=a},getPart:function(){return this.part},setPart:function(a){this.part=a},getRound:function(){return this.round},setRound:function(a){this.round=a},getMorpheStyle:function(){return this.morpheStyle},setMorpheStyle:function(a){this.morpheStyle=a},getBarShape:function(){return this.barShape},setBarShape:function(a){this.barShape=a},getSymbol:function(){return this.symbol},setSymbol:function(a){this.symbol=a},getValue:function(){return this.value},setAscentValue:function(a){if(this.ascent=!0,this.descent=!1,0>a)throw new Error("bar value should be greater than 0");this.value=a},isInflating:function(){return this.inflating},setInflating:function(a){this.inflating=a},isDeflating:function(){return this.deflating},setDeflating:function(a){this.deflating=a},setDescentValue:function(a){if(this.ascent=!1,this.descent=!0,0>a)throw new Error("bar value should be greater than 0");this.value=a},getBase:function(){return this.base},setBase:function(a){this.baseSet=!0,this.base=a},isBaseSet:function(){return this.baseSet},isAscent:function(){return this.ascent},isDescent:function(){return this.descent},isValueSet:function(){return this.ascent||this.descent},getBarStroke:function(){return this.barStroke},setBarStroke:function(a){this.barStroke=a},getBarFill:function(){return this.barFill},setBarFill:function(a){this.barFill=a},getBarEffect:function(){return this.barEffect},setBarEffect:function(a){this.barEffect=a}})}(),function(){JenScript.SymbolStack=function(a){this.__init(a)},JenScript.Model.inheritPrototype(JenScript.SymbolStack,JenScript.SymbolBar),JenScript.Model.addMethods(JenScript.SymbolStack,{__init:function(a){a=a||{},JenScript.SymbolBar.call(this,a),this.hostSymbol,this.stackValue=a.stackValue,this.normalizedValue},toString:function(){return"Stack [hostSymbol="+this.hostSymbol+", stackValue="+this.stackValue+", normalizedValue="+this.normalizedValue+", lockEnter="+this.lockEnter+"]"},getStackValue:function(){return this.stackValue},setStackValue:function(a){this.stackValue=a},getNormalizedValue:function(){return this.normalizedValue},setNormalizedValue:function(a){this.normalizedValue=a},getHostSymbol:function(){return this.hostSymbol},setHostSymbol:function(a){this.hostSymbol=a}}),JenScript.SymbolBarStacked=function(a){this.__init(a)},JenScript.Model.inheritPrototype(JenScript.SymbolBarStacked,JenScript.SymbolBar),JenScript.Model.addMethods(JenScript.SymbolBarStacked,{__init:function(a){a=a||{},JenScript.SymbolBar.call(this,a),this.stacks=[]},getStackBase:function(a){for(var b=this.getBase(),c=0;cc){var g=this.getHost().getProjection().getView().getDevice().getWidth()-c,h=d.length;if(h>0)for(var e=0;ec){var g=this.getHost().getProjection().getView().getDevice().getHeight()-c,h=d.length;if(h>0)for(var e=0;e