ht.lib = ht.lib || {}; if (!ht.lib['风场信息']) { ht.lib['风场信息'] = function (x, y, width, height, angle, localVarObj, localDynamicVar, nodename) { _ratio = GD.getRatioWithRotation(0, ratio); ht.lib['风场信息'].superClass.constructor.apply(this); this.localVarObj = localVarObj; this.localDynamicVar = localDynamicVar; this.childNodes = []; this._styleObject = {}; this._originWidth = 146*_ratio.ratioX; this._originHeight = 141*_ratio.ratioY; this._baseClass = "ht.lib.风场信息"; this._background = new ht.Node(); this._background.setWidth(this._originWidth); this._background.setHeight(this._originHeight); this._background.setPosition(this._originWidth/2, this._originHeight/2); this._background.setImage({ width: width, height: height, clip: true, comps: [ { type: 'rect', background: 'rgba(0,255,0,0)', rect: [0,0,width, height] } ] }); this._background.__parentLib = nodename; this._background.isLibBackground = true; this.childNodes.push(this._background); dataModel.add(this._background); /*@PageBackgroundInit@*/ /*@PageBeforeInit@*/ var Lib_风场信息Node0; (function () { var _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio); var ratioX, ratioY; if ('Default' === 'False') { ratioX = 1; ratioY = 1; } else if ('Default' === 'X') { ratioX = ratioY = _ratio.ratioX; } else if ('Default' === 'Y') { ratioX = ratioY = _ratio.ratioY; } else { ratioX = _ratio.ratioX; ratioY = _ratio.ratioY; } ht.Default.setImage('imgimage//img//map_name_03.png', PAGEROOTDIR + 'image//img//map_name_03.png'); Lib_风场信息Node0 = new ht.Node(); Lib_风场信息Node0.setPosition(73*ratio.ratioX, 70*ratio.ratioY); Lib_风场信息Node0.setSize(146*ratioX, 141*ratioY); Lib_风场信息Node0.setImage('imgimage//img//map_name_03.png'); Lib_风场信息Node0.setRotation(0*Math.PI/180); Lib_风场信息Node0._zoomBy = 'Default'; Lib_风场信息Node0._nodeType = 'image'; Lib_风场信息Node0._disallowEvert = true; dataModel.add(Lib_风场信息Node0); })(); _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio); var Lib_风场信息Node1 = new ht.Node(); var Lib_风场信息Node1textStart, Lib_风场信息Node1textWidth, Lib_风场信息Node1lineStart, Lib_风场信息Node1align = 'left', Lib_风场信息Node1fontSize = 10.66664*_ratio.ratioY,Lib_风场信息Node1width = 51*_ratio.ratioX, Lib_风场信息Node1height = 13*_ratio.ratioY; (function () { if (Lib_风场信息Node1align === 'left') { Lib_风场信息Node1textStart = Lib_风场信息Node1fontSize * 0.2 > 2 ? Lib_风场信息Node1fontSize * 0.2 - 4 : Lib_风场信息Node1fontSize * 0.2 - 9; Lib_风场信息Node1textWidth = Lib_风场信息Node1width; Lib_风场信息Node1lineStart = 1; } else if (Lib_风场信息Node1align === 'right') { Lib_风场信息Node1textStart = 0; Lib_风场信息Node1textWidth =Lib_风场信息Node1fontSize <= 8 ? Lib_风场信息Node1width + Lib_风场信息Node1fontSize * 0.2 + 6 : Lib_风场信息Node1width - Lib_风场信息Node1fontSize * 0.2; Lib_风场信息Node1lineStart = (Lib_风场信息Node1width - (ht.Default.getTextSize('风机台数', ' '+ Lib_风场信息Node1fontSize + 'px "Arial"').width + 6)) * 0.5; } else if (Lib_风场信息Node1align === 'center') { Lib_风场信息Node1textStart = -3; Lib_风场信息Node1textWidth = Lib_风场信息Node1width; Lib_风场信息Node1lineStart = Lib_风场信息Node1width - ht.Default.getTextSize('风机台数', ' '+ Lib_风场信息Node1fontSize + 'px "Arial"').width - 11; } })(); Lib_风场信息Node1.setImage(GD.getTextJSON(Lib_风场信息Node1width, Lib_风场信息Node1height, true, false, false, ' '+ Lib_风场信息Node1fontSize + 'px "Arial"')) Lib_风场信息Node1.setPosition(32*ratio.ratioX, 23*ratio.ratioY); Lib_风场信息Node1.setWidth(Lib_风场信息Node1width); Lib_风场信息Node1.setHeight(Lib_风场信息Node1height); Lib_风场信息Node1._nodeType = 'text'; Lib_风场信息Node1._disallowEvert = true; Lib_风场信息Node1.setRotation(0*Math.PI/180); Lib_风场信息Node1.a('node.width', Lib_风场信息Node1width); Lib_风场信息Node1.a('node.height', Lib_风场信息Node1height); Lib_风场信息Node1.a('node.rect', [0, 0, Lib_风场信息Node1width, Lib_风场信息Node1height]); Lib_风场信息Node1.a('node.bordercolor','rgba(0,0,0,1)'); Lib_风场信息Node1.a('node.borderwidth', 0); Lib_风场信息Node1.a('node.background','' || 'rgba(0,0,0,0)'); Lib_风场信息Node1.a('node.gradient',''); Lib_风场信息Node1.a('node.gradientcolor',''); Lib_风场信息Node1.a('node.text','风机台数'); Lib_风场信息Node1.a('node.textalign','left'); Lib_风场信息Node1.a('node.textvAlign','middle'); Lib_风场信息Node1.a('node.textrect', [Lib_风场信息Node1textStart, 0, Lib_风场信息Node1textWidth, Lib_风场信息Node1height]); Lib_风场信息Node1.a('node.color','rgba(0,0,0,1)'); Lib_风场信息Node1.a('node.font',' '+ Lib_风场信息Node1fontSize + 'px "Arial"'); Lib_风场信息Node1.a('node.textvisible',true); Lib_风场信息Node1.a('node.linefeed',false); if (false) { Lib_风场信息Node1.a('node.textfunc',function(g) { g.beginPath(); var str=Lib_风场信息Node1.a('node.text') || '风机台数'; var color=Lib_风场信息Node1.a('node.color') || 'rgba(0,0,0,1)'; canvasTextAutoLine(str,0,10.66664*0.5*_ratio.ratioY,Lib_风场信息Node1width,Lib_风场信息Node1height,10.66664*_ratio.ratioY,"left",color,' '+ Lib_风场信息Node1fontSize + 'px "Arial"', 0,g); }); } if (false) { Lib_风场信息Node1.a('node.underlinepoints',[Lib_风场信息Node1lineStart, (13 - 10.66664) * 0.5 * _ratio.ratioY + Lib_风场信息Node1fontSize + 2 , ht.Default.getTextSize('风机台数', ' '+ Lib_风场信息Node1fontSize + 'px "Arial"').width + 6, (Lib_风场信息Node1height - Lib_风场信息Node1fontSize) * 0.5*_ratio.ratioY + Lib_风场信息Node1fontSize + 2 ]); Lib_风场信息Node1.a('node.underlinevisible',false); Lib_风场信息Node1.a('node.underlineBorderWidth', 1); } dataModel.add(Lib_风场信息Node1); zoomNodeList.push({ node: Lib_风场信息Node1, borderWidth: 0, attr: 'node.borderwidth' }); _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio); var Lib_风场信息Node2 = new ht.Node(); var Lib_风场信息Node2textStart, Lib_风场信息Node2textWidth, Lib_风场信息Node2lineStart, Lib_风场信息Node2align = 'left', Lib_风场信息Node2fontSize = 10.66664*_ratio.ratioY,Lib_风场信息Node2width = 15*_ratio.ratioX, Lib_风场信息Node2height = 13*_ratio.ratioY; (function () { if (Lib_风场信息Node2align === 'left') { Lib_风场信息Node2textStart = Lib_风场信息Node2fontSize * 0.2 > 2 ? Lib_风场信息Node2fontSize * 0.2 - 4 : Lib_风场信息Node2fontSize * 0.2 - 9; Lib_风场信息Node2textWidth = Lib_风场信息Node2width; Lib_风场信息Node2lineStart = 1; } else if (Lib_风场信息Node2align === 'right') { Lib_风场信息Node2textStart = 0; Lib_风场信息Node2textWidth =Lib_风场信息Node2fontSize <= 8 ? Lib_风场信息Node2width + Lib_风场信息Node2fontSize * 0.2 + 6 : Lib_风场信息Node2width - Lib_风场信息Node2fontSize * 0.2; Lib_风场信息Node2lineStart = (Lib_风场信息Node2width - (ht.Default.getTextSize('99', ' '+ Lib_风场信息Node2fontSize + 'px "Arial"').width + 6)) * 0.5; } else if (Lib_风场信息Node2align === 'center') { Lib_风场信息Node2textStart = -3; Lib_风场信息Node2textWidth = Lib_风场信息Node2width; Lib_风场信息Node2lineStart = Lib_风场信息Node2width - ht.Default.getTextSize('99', ' '+ Lib_风场信息Node2fontSize + 'px "Arial"').width - 11; } })(); Lib_风场信息Node2.setImage(GD.getTextJSON(Lib_风场信息Node2width, Lib_风场信息Node2height, true, false, false, ' '+ Lib_风场信息Node2fontSize + 'px "Arial"')) Lib_风场信息Node2.setPosition(78*ratio.ratioX, 23*ratio.ratioY); Lib_风场信息Node2.setWidth(Lib_风场信息Node2width); Lib_风场信息Node2.setHeight(Lib_风场信息Node2height); Lib_风场信息Node2._nodeType = 'text'; Lib_风场信息Node2._disallowEvert = true; Lib_风场信息Node2.setRotation(0*Math.PI/180); Lib_风场信息Node2.a('node.width', Lib_风场信息Node2width); Lib_风场信息Node2.a('node.height', Lib_风场信息Node2height); Lib_风场信息Node2.a('node.rect', [0, 0, Lib_风场信息Node2width, Lib_风场信息Node2height]); Lib_风场信息Node2.a('node.bordercolor','rgba(192,0,0,1)'); Lib_风场信息Node2.a('node.borderwidth', 0); Lib_风场信息Node2.a('node.background','' || 'rgba(0,0,0,0)'); Lib_风场信息Node2.a('node.gradient',''); Lib_风场信息Node2.a('node.gradientcolor',''); Lib_风场信息Node2.a('node.text','99'); Lib_风场信息Node2.a('node.textalign','left'); Lib_风场信息Node2.a('node.textvAlign','middle'); Lib_风场信息Node2.a('node.textrect', [Lib_风场信息Node2textStart, 0, Lib_风场信息Node2textWidth, Lib_风场信息Node2height]); Lib_风场信息Node2.a('node.color','rgba(192,0,0,1)'); Lib_风场信息Node2.a('node.font',' '+ Lib_风场信息Node2fontSize + 'px "Arial"'); Lib_风场信息Node2.a('node.textvisible',true); Lib_风场信息Node2.a('node.linefeed',false); if (false) { Lib_风场信息Node2.a('node.textfunc',function(g) { g.beginPath(); var str=Lib_风场信息Node2.a('node.text') || '99'; var color=Lib_风场信息Node2.a('node.color') || 'rgba(192,0,0,1)'; canvasTextAutoLine(str,0,10.66664*0.5*_ratio.ratioY,Lib_风场信息Node2width,Lib_风场信息Node2height,10.66664*_ratio.ratioY,"left",color,' '+ Lib_风场信息Node2fontSize + 'px "Arial"', 0,g); }); } if (false) { Lib_风场信息Node2.a('node.underlinepoints',[Lib_风场信息Node2lineStart, (13 - 10.66664) * 0.5 * _ratio.ratioY + Lib_风场信息Node2fontSize + 2 , ht.Default.getTextSize('99', ' '+ Lib_风场信息Node2fontSize + 'px "Arial"').width + 6, (Lib_风场信息Node2height - Lib_风场信息Node2fontSize) * 0.5*_ratio.ratioY + Lib_风场信息Node2fontSize + 2 ]); Lib_风场信息Node2.a('node.underlinevisible',false); Lib_风场信息Node2.a('node.underlineBorderWidth', 1); } dataModel.add(Lib_风场信息Node2); zoomNodeList.push({ node: Lib_风场信息Node2, borderWidth: 0, attr: 'node.borderwidth' }); _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio); var Lib_风场信息Node3 = new ht.Node(); var Lib_风场信息Node3textStart, Lib_风场信息Node3textWidth, Lib_风场信息Node3lineStart, Lib_风场信息Node3align = 'left', Lib_风场信息Node3fontSize = 10.66664*_ratio.ratioY,Lib_风场信息Node3width = 35*_ratio.ratioX, Lib_风场信息Node3height = 13*_ratio.ratioY; (function () { if (Lib_风场信息Node3align === 'left') { Lib_风场信息Node3textStart = Lib_风场信息Node3fontSize * 0.2 > 2 ? Lib_风场信息Node3fontSize * 0.2 - 4 : Lib_风场信息Node3fontSize * 0.2 - 9; Lib_风场信息Node3textWidth = Lib_风场信息Node3width; Lib_风场信息Node3lineStart = 1; } else if (Lib_风场信息Node3align === 'right') { Lib_风场信息Node3textStart = 0; Lib_风场信息Node3textWidth =Lib_风场信息Node3fontSize <= 8 ? Lib_风场信息Node3width + Lib_风场信息Node3fontSize * 0.2 + 6 : Lib_风场信息Node3width - Lib_风场信息Node3fontSize * 0.2; Lib_风场信息Node3lineStart = (Lib_风场信息Node3width - (ht.Default.getTextSize('万kwh', ' '+ Lib_风场信息Node3fontSize + 'px "Arial"').width + 6)) * 0.5; } else if (Lib_风场信息Node3align === 'center') { Lib_风场信息Node3textStart = -3; Lib_风场信息Node3textWidth = Lib_风场信息Node3width; Lib_风场信息Node3lineStart = Lib_风场信息Node3width - ht.Default.getTextSize('万kwh', ' '+ Lib_风场信息Node3fontSize + 'px "Arial"').width - 11; } })(); Lib_风场信息Node3.setImage(GD.getTextJSON(Lib_风场信息Node3width, Lib_风场信息Node3height, true, false, false, ' '+ Lib_风场信息Node3fontSize + 'px "Arial"')) Lib_风场信息Node3.setPosition(124*ratio.ratioX, 23*ratio.ratioY); Lib_风场信息Node3.setWidth(Lib_风场信息Node3width); Lib_风场信息Node3.setHeight(Lib_风场信息Node3height); Lib_风场信息Node3._nodeType = 'text'; Lib_风场信息Node3._disallowEvert = true; Lib_风场信息Node3.setRotation(0*Math.PI/180); Lib_风场信息Node3.a('node.width', Lib_风场信息Node3width); Lib_风场信息Node3.a('node.height', Lib_风场信息Node3height); Lib_风场信息Node3.a('node.rect', [0, 0, Lib_风场信息Node3width, Lib_风场信息Node3height]); Lib_风场信息Node3.a('node.bordercolor','rgba(0,0,0,1)'); Lib_风场信息Node3.a('node.borderwidth', 0); Lib_风场信息Node3.a('node.background','' || 'rgba(0,0,0,0)'); Lib_风场信息Node3.a('node.gradient',''); Lib_风场信息Node3.a('node.gradientcolor',''); Lib_风场信息Node3.a('node.text','万kwh'); Lib_风场信息Node3.a('node.textalign','left'); Lib_风场信息Node3.a('node.textvAlign','middle'); Lib_风场信息Node3.a('node.textrect', [Lib_风场信息Node3textStart, 0, Lib_风场信息Node3textWidth, Lib_风场信息Node3height]); Lib_风场信息Node3.a('node.color','rgba(0,0,0,1)'); Lib_风场信息Node3.a('node.font',' '+ Lib_风场信息Node3fontSize + 'px "Arial"'); Lib_风场信息Node3.a('node.textvisible',true); Lib_风场信息Node3.a('node.linefeed',false); if (false) { Lib_风场信息Node3.a('node.textfunc',function(g) { g.beginPath(); var str=Lib_风场信息Node3.a('node.text') || '万kwh'; var color=Lib_风场信息Node3.a('node.color') || 'rgba(0,0,0,1)'; canvasTextAutoLine(str,0,10.66664*0.5*_ratio.ratioY,Lib_风场信息Node3width,Lib_风场信息Node3height,10.66664*_ratio.ratioY,"left",color,' '+ Lib_风场信息Node3fontSize + 'px "Arial"', 0,g); }); } if (false) { Lib_风场信息Node3.a('node.underlinepoints',[Lib_风场信息Node3lineStart, (13 - 10.66664) * 0.5 * _ratio.ratioY + Lib_风场信息Node3fontSize + 2 , ht.Default.getTextSize('万kwh', ' '+ Lib_风场信息Node3fontSize + 'px "Arial"').width + 6, (Lib_风场信息Node3height - Lib_风场信息Node3fontSize) * 0.5*_ratio.ratioY + Lib_风场信息Node3fontSize + 2 ]); Lib_风场信息Node3.a('node.underlinevisible',false); Lib_风场信息Node3.a('node.underlineBorderWidth', 1); } dataModel.add(Lib_风场信息Node3); zoomNodeList.push({ node: Lib_风场信息Node3, borderWidth: 0, attr: 'node.borderwidth' }); _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio); var Lib_风场信息Node4 = new ht.Node(); var Lib_风场信息Node4textStart, Lib_风场信息Node4textWidth, Lib_风场信息Node4lineStart, Lib_风场信息Node4align = 'left', Lib_风场信息Node4fontSize = 10.66664*_ratio.ratioY,Lib_风场信息Node4width = 51*_ratio.ratioX, Lib_风场信息Node4height = 13*_ratio.ratioY; (function () { if (Lib_风场信息Node4align === 'left') { Lib_风场信息Node4textStart = Lib_风场信息Node4fontSize * 0.2 > 2 ? Lib_风场信息Node4fontSize * 0.2 - 4 : Lib_风场信息Node4fontSize * 0.2 - 9; Lib_风场信息Node4textWidth = Lib_风场信息Node4width; Lib_风场信息Node4lineStart = 1; } else if (Lib_风场信息Node4align === 'right') { Lib_风场信息Node4textStart = 0; Lib_风场信息Node4textWidth =Lib_风场信息Node4fontSize <= 8 ? Lib_风场信息Node4width + Lib_风场信息Node4fontSize * 0.2 + 6 : Lib_风场信息Node4width - Lib_风场信息Node4fontSize * 0.2; Lib_风场信息Node4lineStart = (Lib_风场信息Node4width - (ht.Default.getTextSize('装机容量', ' '+ Lib_风场信息Node4fontSize + 'px "Arial"').width + 6)) * 0.5; } else if (Lib_风场信息Node4align === 'center') { Lib_风场信息Node4textStart = -3; Lib_风场信息Node4textWidth = Lib_风场信息Node4width; Lib_风场信息Node4lineStart = Lib_风场信息Node4width - ht.Default.getTextSize('装机容量', ' '+ Lib_风场信息Node4fontSize + 'px "Arial"').width - 11; } })(); Lib_风场信息Node4.setImage(GD.getTextJSON(Lib_风场信息Node4width, Lib_风场信息Node4height, true, false, false, ' '+ Lib_风场信息Node4fontSize + 'px "Arial"')) Lib_风场信息Node4.setPosition(32*ratio.ratioX, 49*ratio.ratioY); Lib_风场信息Node4.setWidth(Lib_风场信息Node4width); Lib_风场信息Node4.setHeight(Lib_风场信息Node4height); Lib_风场信息Node4._nodeType = 'text'; Lib_风场信息Node4._disallowEvert = true; Lib_风场信息Node4.setRotation(0*Math.PI/180); Lib_风场信息Node4.a('node.width', Lib_风场信息Node4width); Lib_风场信息Node4.a('node.height', Lib_风场信息Node4height); Lib_风场信息Node4.a('node.rect', [0, 0, Lib_风场信息Node4width, Lib_风场信息Node4height]); Lib_风场信息Node4.a('node.bordercolor','rgba(0,0,0,1)'); Lib_风场信息Node4.a('node.borderwidth', 0); Lib_风场信息Node4.a('node.background','' || 'rgba(0,0,0,0)'); Lib_风场信息Node4.a('node.gradient',''); Lib_风场信息Node4.a('node.gradientcolor',''); Lib_风场信息Node4.a('node.text','装机容量'); Lib_风场信息Node4.a('node.textalign','left'); Lib_风场信息Node4.a('node.textvAlign','middle'); Lib_风场信息Node4.a('node.textrect', [Lib_风场信息Node4textStart, 0, Lib_风场信息Node4textWidth, Lib_风场信息Node4height]); Lib_风场信息Node4.a('node.color','rgba(0,0,0,1)'); Lib_风场信息Node4.a('node.font',' '+ Lib_风场信息Node4fontSize + 'px "Arial"'); Lib_风场信息Node4.a('node.textvisible',true); Lib_风场信息Node4.a('node.linefeed',false); if (false) { Lib_风场信息Node4.a('node.textfunc',function(g) { g.beginPath(); var str=Lib_风场信息Node4.a('node.text') || '装机容量'; var color=Lib_风场信息Node4.a('node.color') || 'rgba(0,0,0,1)'; canvasTextAutoLine(str,0,10.66664*0.5*_ratio.ratioY,Lib_风场信息Node4width,Lib_风场信息Node4height,10.66664*_ratio.ratioY,"left",color,' '+ Lib_风场信息Node4fontSize + 'px "Arial"', 0,g); }); } if (false) { Lib_风场信息Node4.a('node.underlinepoints',[Lib_风场信息Node4lineStart, (13 - 10.66664) * 0.5 * _ratio.ratioY + Lib_风场信息Node4fontSize + 2 , ht.Default.getTextSize('装机容量', ' '+ Lib_风场信息Node4fontSize + 'px "Arial"').width + 6, (Lib_风场信息Node4height - Lib_风场信息Node4fontSize) * 0.5*_ratio.ratioY + Lib_风场信息Node4fontSize + 2 ]); Lib_风场信息Node4.a('node.underlinevisible',false); Lib_风场信息Node4.a('node.underlineBorderWidth', 1); } dataModel.add(Lib_风场信息Node4); zoomNodeList.push({ node: Lib_风场信息Node4, borderWidth: 0, attr: 'node.borderwidth' }); _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio); var Lib_风场信息Node5 = new ht.Node(); var Lib_风场信息Node5textStart, Lib_风场信息Node5textWidth, Lib_风场信息Node5lineStart, Lib_风场信息Node5align = 'left', Lib_风场信息Node5fontSize = 10.66664*_ratio.ratioY,Lib_风场信息Node5width = 31*_ratio.ratioX, Lib_风场信息Node5height = 13*_ratio.ratioY; (function () { if (Lib_风场信息Node5align === 'left') { Lib_风场信息Node5textStart = Lib_风场信息Node5fontSize * 0.2 > 2 ? Lib_风场信息Node5fontSize * 0.2 - 4 : Lib_风场信息Node5fontSize * 0.2 - 9; Lib_风场信息Node5textWidth = Lib_风场信息Node5width; Lib_风场信息Node5lineStart = 1; } else if (Lib_风场信息Node5align === 'right') { Lib_风场信息Node5textStart = 0; Lib_风场信息Node5textWidth =Lib_风场信息Node5fontSize <= 8 ? Lib_风场信息Node5width + Lib_风场信息Node5fontSize * 0.2 + 6 : Lib_风场信息Node5width - Lib_风场信息Node5fontSize * 0.2; Lib_风场信息Node5lineStart = (Lib_风场信息Node5width - (ht.Default.getTextSize('14.85', ' '+ Lib_风场信息Node5fontSize + 'px "Arial"').width + 6)) * 0.5; } else if (Lib_风场信息Node5align === 'center') { Lib_风场信息Node5textStart = -3; Lib_风场信息Node5textWidth = Lib_风场信息Node5width; Lib_风场信息Node5lineStart = Lib_风场信息Node5width - ht.Default.getTextSize('14.85', ' '+ Lib_风场信息Node5fontSize + 'px "Arial"').width - 11; } })(); Lib_风场信息Node5.setImage(GD.getTextJSON(Lib_风场信息Node5width, Lib_风场信息Node5height, true, false, false, ' '+ Lib_风场信息Node5fontSize + 'px "Arial"')) Lib_风场信息Node5.setPosition(86*ratio.ratioX, 49*ratio.ratioY); Lib_风场信息Node5.setWidth(Lib_风场信息Node5width); Lib_风场信息Node5.setHeight(Lib_风场信息Node5height); Lib_风场信息Node5._nodeType = 'text'; Lib_风场信息Node5._disallowEvert = true; Lib_风场信息Node5.setRotation(0*Math.PI/180); Lib_风场信息Node5.a('node.width', Lib_风场信息Node5width); Lib_风场信息Node5.a('node.height', Lib_风场信息Node5height); Lib_风场信息Node5.a('node.rect', [0, 0, Lib_风场信息Node5width, Lib_风场信息Node5height]); Lib_风场信息Node5.a('node.bordercolor','rgba(192,0,0,1)'); Lib_风场信息Node5.a('node.borderwidth', 0); Lib_风场信息Node5.a('node.background','' || 'rgba(0,0,0,0)'); Lib_风场信息Node5.a('node.gradient',''); Lib_风场信息Node5.a('node.gradientcolor',''); Lib_风场信息Node5.a('node.text','14.85'); Lib_风场信息Node5.a('node.textalign','left'); Lib_风场信息Node5.a('node.textvAlign','middle'); Lib_风场信息Node5.a('node.textrect', [Lib_风场信息Node5textStart, 0, Lib_风场信息Node5textWidth, Lib_风场信息Node5height]); Lib_风场信息Node5.a('node.color','rgba(192,0,0,1)'); Lib_风场信息Node5.a('node.font',' '+ Lib_风场信息Node5fontSize + 'px "Arial"'); Lib_风场信息Node5.a('node.textvisible',true); Lib_风场信息Node5.a('node.linefeed',false); if (false) { Lib_风场信息Node5.a('node.textfunc',function(g) { g.beginPath(); var str=Lib_风场信息Node5.a('node.text') || '14.85'; var color=Lib_风场信息Node5.a('node.color') || 'rgba(192,0,0,1)'; canvasTextAutoLine(str,0,10.66664*0.5*_ratio.ratioY,Lib_风场信息Node5width,Lib_风场信息Node5height,10.66664*_ratio.ratioY,"left",color,' '+ Lib_风场信息Node5fontSize + 'px "Arial"', 0,g); }); } if (false) { Lib_风场信息Node5.a('node.underlinepoints',[Lib_风场信息Node5lineStart, (13 - 10.66664) * 0.5 * _ratio.ratioY + Lib_风场信息Node5fontSize + 2 , ht.Default.getTextSize('14.85', ' '+ Lib_风场信息Node5fontSize + 'px "Arial"').width + 6, (Lib_风场信息Node5height - Lib_风场信息Node5fontSize) * 0.5*_ratio.ratioY + Lib_风场信息Node5fontSize + 2 ]); Lib_风场信息Node5.a('node.underlinevisible',false); Lib_风场信息Node5.a('node.underlineBorderWidth', 1); } dataModel.add(Lib_风场信息Node5); zoomNodeList.push({ node: Lib_风场信息Node5, borderWidth: 0, attr: 'node.borderwidth' }); _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio); var Lib_风场信息Node6 = new ht.Node(); var Lib_风场信息Node6textStart, Lib_风场信息Node6textWidth, Lib_风场信息Node6lineStart, Lib_风场信息Node6align = 'left', Lib_风场信息Node6fontSize = 10.66664*_ratio.ratioY,Lib_风场信息Node6width = 35*_ratio.ratioX, Lib_风场信息Node6height = 13*_ratio.ratioY; (function () { if (Lib_风场信息Node6align === 'left') { Lib_风场信息Node6textStart = Lib_风场信息Node6fontSize * 0.2 > 2 ? Lib_风场信息Node6fontSize * 0.2 - 4 : Lib_风场信息Node6fontSize * 0.2 - 9; Lib_风场信息Node6textWidth = Lib_风场信息Node6width; Lib_风场信息Node6lineStart = 1; } else if (Lib_风场信息Node6align === 'right') { Lib_风场信息Node6textStart = 0; Lib_风场信息Node6textWidth =Lib_风场信息Node6fontSize <= 8 ? Lib_风场信息Node6width + Lib_风场信息Node6fontSize * 0.2 + 6 : Lib_风场信息Node6width - Lib_风场信息Node6fontSize * 0.2; Lib_风场信息Node6lineStart = (Lib_风场信息Node6width - (ht.Default.getTextSize('万kwh', ' '+ Lib_风场信息Node6fontSize + 'px "Arial"').width + 6)) * 0.5; } else if (Lib_风场信息Node6align === 'center') { Lib_风场信息Node6textStart = -3; Lib_风场信息Node6textWidth = Lib_风场信息Node6width; Lib_风场信息Node6lineStart = Lib_风场信息Node6width - ht.Default.getTextSize('万kwh', ' '+ Lib_风场信息Node6fontSize + 'px "Arial"').width - 11; } })(); Lib_风场信息Node6.setImage(GD.getTextJSON(Lib_风场信息Node6width, Lib_风场信息Node6height, true, false, false, ' '+ Lib_风场信息Node6fontSize + 'px "Arial"')) Lib_风场信息Node6.setPosition(124*ratio.ratioX, 49*ratio.ratioY); Lib_风场信息Node6.setWidth(Lib_风场信息Node6width); Lib_风场信息Node6.setHeight(Lib_风场信息Node6height); Lib_风场信息Node6._nodeType = 'text'; Lib_风场信息Node6._disallowEvert = true; Lib_风场信息Node6.setRotation(0*Math.PI/180); Lib_风场信息Node6.a('node.width', Lib_风场信息Node6width); Lib_风场信息Node6.a('node.height', Lib_风场信息Node6height); Lib_风场信息Node6.a('node.rect', [0, 0, Lib_风场信息Node6width, Lib_风场信息Node6height]); Lib_风场信息Node6.a('node.bordercolor','rgba(0,0,0,1)'); Lib_风场信息Node6.a('node.borderwidth', 0); Lib_风场信息Node6.a('node.background','' || 'rgba(0,0,0,0)'); Lib_风场信息Node6.a('node.gradient',''); Lib_风场信息Node6.a('node.gradientcolor',''); Lib_风场信息Node6.a('node.text','万kwh'); Lib_风场信息Node6.a('node.textalign','left'); Lib_风场信息Node6.a('node.textvAlign','middle'); Lib_风场信息Node6.a('node.textrect', [Lib_风场信息Node6textStart, 0, Lib_风场信息Node6textWidth, Lib_风场信息Node6height]); Lib_风场信息Node6.a('node.color','rgba(0,0,0,1)'); Lib_风场信息Node6.a('node.font',' '+ Lib_风场信息Node6fontSize + 'px "Arial"'); Lib_风场信息Node6.a('node.textvisible',true); Lib_风场信息Node6.a('node.linefeed',false); if (false) { Lib_风场信息Node6.a('node.textfunc',function(g) { g.beginPath(); var str=Lib_风场信息Node6.a('node.text') || '万kwh'; var color=Lib_风场信息Node6.a('node.color') || 'rgba(0,0,0,1)'; canvasTextAutoLine(str,0,10.66664*0.5*_ratio.ratioY,Lib_风场信息Node6width,Lib_风场信息Node6height,10.66664*_ratio.ratioY,"left",color,' '+ Lib_风场信息Node6fontSize + 'px "Arial"', 0,g); }); } if (false) { Lib_风场信息Node6.a('node.underlinepoints',[Lib_风场信息Node6lineStart, (13 - 10.66664) * 0.5 * _ratio.ratioY + Lib_风场信息Node6fontSize + 2 , ht.Default.getTextSize('万kwh', ' '+ Lib_风场信息Node6fontSize + 'px "Arial"').width + 6, (Lib_风场信息Node6height - Lib_风场信息Node6fontSize) * 0.5*_ratio.ratioY + Lib_风场信息Node6fontSize + 2 ]); Lib_风场信息Node6.a('node.underlinevisible',false); Lib_风场信息Node6.a('node.underlineBorderWidth', 1); } dataModel.add(Lib_风场信息Node6); zoomNodeList.push({ node: Lib_风场信息Node6, borderWidth: 0, attr: 'node.borderwidth' }); _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio); var Lib_风场信息Node7 = new ht.Node(); var Lib_风场信息Node7textStart, Lib_风场信息Node7textWidth, Lib_风场信息Node7lineStart, Lib_风场信息Node7align = 'left', Lib_风场信息Node7fontSize = 10.66664*_ratio.ratioY,Lib_风场信息Node7width = 51*_ratio.ratioX, Lib_风场信息Node7height = 13*_ratio.ratioY; (function () { if (Lib_风场信息Node7align === 'left') { Lib_风场信息Node7textStart = Lib_风场信息Node7fontSize * 0.2 > 2 ? Lib_风场信息Node7fontSize * 0.2 - 4 : Lib_风场信息Node7fontSize * 0.2 - 9; Lib_风场信息Node7textWidth = Lib_风场信息Node7width; Lib_风场信息Node7lineStart = 1; } else if (Lib_风场信息Node7align === 'right') { Lib_风场信息Node7textStart = 0; Lib_风场信息Node7textWidth =Lib_风场信息Node7fontSize <= 8 ? Lib_风场信息Node7width + Lib_风场信息Node7fontSize * 0.2 + 6 : Lib_风场信息Node7width - Lib_风场信息Node7fontSize * 0.2; Lib_风场信息Node7lineStart = (Lib_风场信息Node7width - (ht.Default.getTextSize('平均风速', ' '+ Lib_风场信息Node7fontSize + 'px "Arial"').width + 6)) * 0.5; } else if (Lib_风场信息Node7align === 'center') { Lib_风场信息Node7textStart = -3; Lib_风场信息Node7textWidth = Lib_风场信息Node7width; Lib_风场信息Node7lineStart = Lib_风场信息Node7width - ht.Default.getTextSize('平均风速', ' '+ Lib_风场信息Node7fontSize + 'px "Arial"').width - 11; } })(); Lib_风场信息Node7.setImage(GD.getTextJSON(Lib_风场信息Node7width, Lib_风场信息Node7height, true, false, false, ' '+ Lib_风场信息Node7fontSize + 'px "Arial"')) Lib_风场信息Node7.setPosition(32*ratio.ratioX, 74*ratio.ratioY); Lib_风场信息Node7.setWidth(Lib_风场信息Node7width); Lib_风场信息Node7.setHeight(Lib_风场信息Node7height); Lib_风场信息Node7._nodeType = 'text'; Lib_风场信息Node7._disallowEvert = true; Lib_风场信息Node7.setRotation(0*Math.PI/180); Lib_风场信息Node7.a('node.width', Lib_风场信息Node7width); Lib_风场信息Node7.a('node.height', Lib_风场信息Node7height); Lib_风场信息Node7.a('node.rect', [0, 0, Lib_风场信息Node7width, Lib_风场信息Node7height]); Lib_风场信息Node7.a('node.bordercolor','rgba(0,0,0,1)'); Lib_风场信息Node7.a('node.borderwidth', 0); Lib_风场信息Node7.a('node.background','' || 'rgba(0,0,0,0)'); Lib_风场信息Node7.a('node.gradient',''); Lib_风场信息Node7.a('node.gradientcolor',''); Lib_风场信息Node7.a('node.text','平均风速'); Lib_风场信息Node7.a('node.textalign','left'); Lib_风场信息Node7.a('node.textvAlign','middle'); Lib_风场信息Node7.a('node.textrect', [Lib_风场信息Node7textStart, 0, Lib_风场信息Node7textWidth, Lib_风场信息Node7height]); Lib_风场信息Node7.a('node.color','rgba(0,0,0,1)'); Lib_风场信息Node7.a('node.font',' '+ Lib_风场信息Node7fontSize + 'px "Arial"'); Lib_风场信息Node7.a('node.textvisible',true); Lib_风场信息Node7.a('node.linefeed',false); if (false) { Lib_风场信息Node7.a('node.textfunc',function(g) { g.beginPath(); var str=Lib_风场信息Node7.a('node.text') || '平均风速'; var color=Lib_风场信息Node7.a('node.color') || 'rgba(0,0,0,1)'; canvasTextAutoLine(str,0,10.66664*0.5*_ratio.ratioY,Lib_风场信息Node7width,Lib_风场信息Node7height,10.66664*_ratio.ratioY,"left",color,' '+ Lib_风场信息Node7fontSize + 'px "Arial"', 0,g); }); } if (false) { Lib_风场信息Node7.a('node.underlinepoints',[Lib_风场信息Node7lineStart, (13 - 10.66664) * 0.5 * _ratio.ratioY + Lib_风场信息Node7fontSize + 2 , ht.Default.getTextSize('平均风速', ' '+ Lib_风场信息Node7fontSize + 'px "Arial"').width + 6, (Lib_风场信息Node7height - Lib_风场信息Node7fontSize) * 0.5*_ratio.ratioY + Lib_风场信息Node7fontSize + 2 ]); Lib_风场信息Node7.a('node.underlinevisible',false); Lib_风场信息Node7.a('node.underlineBorderWidth', 1); } dataModel.add(Lib_风场信息Node7); zoomNodeList.push({ node: Lib_风场信息Node7, borderWidth: 0, attr: 'node.borderwidth' }); _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio); var Lib_风场信息Node8 = new ht.Node(); var Lib_风场信息Node8textStart, Lib_风场信息Node8textWidth, Lib_风场信息Node8lineStart, Lib_风场信息Node8align = 'left', Lib_风场信息Node8fontSize = 10.66664*_ratio.ratioY,Lib_风场信息Node8width = 7*_ratio.ratioX, Lib_风场信息Node8height = 13*_ratio.ratioY; (function () { if (Lib_风场信息Node8align === 'left') { Lib_风场信息Node8textStart = Lib_风场信息Node8fontSize * 0.2 > 2 ? Lib_风场信息Node8fontSize * 0.2 - 4 : Lib_风场信息Node8fontSize * 0.2 - 9; Lib_风场信息Node8textWidth = Lib_风场信息Node8width; Lib_风场信息Node8lineStart = 1; } else if (Lib_风场信息Node8align === 'right') { Lib_风场信息Node8textStart = 0; Lib_风场信息Node8textWidth =Lib_风场信息Node8fontSize <= 8 ? Lib_风场信息Node8width + Lib_风场信息Node8fontSize * 0.2 + 6 : Lib_风场信息Node8width - Lib_风场信息Node8fontSize * 0.2; Lib_风场信息Node8lineStart = (Lib_风场信息Node8width - (ht.Default.getTextSize('-', ' '+ Lib_风场信息Node8fontSize + 'px "Arial"').width + 6)) * 0.5; } else if (Lib_风场信息Node8align === 'center') { Lib_风场信息Node8textStart = -3; Lib_风场信息Node8textWidth = Lib_风场信息Node8width; Lib_风场信息Node8lineStart = Lib_风场信息Node8width - ht.Default.getTextSize('-', ' '+ Lib_风场信息Node8fontSize + 'px "Arial"').width - 11; } })(); Lib_风场信息Node8.setImage(GD.getTextJSON(Lib_风场信息Node8width, Lib_风场信息Node8height, true, false, false, ' '+ Lib_风场信息Node8fontSize + 'px "Arial"')) Lib_风场信息Node8.setPosition(74*ratio.ratioX, 74*ratio.ratioY); Lib_风场信息Node8.setWidth(Lib_风场信息Node8width); Lib_风场信息Node8.setHeight(Lib_风场信息Node8height); Lib_风场信息Node8._nodeType = 'text'; Lib_风场信息Node8._disallowEvert = true; Lib_风场信息Node8.setRotation(0*Math.PI/180); Lib_风场信息Node8.a('node.width', Lib_风场信息Node8width); Lib_风场信息Node8.a('node.height', Lib_风场信息Node8height); Lib_风场信息Node8.a('node.rect', [0, 0, Lib_风场信息Node8width, Lib_风场信息Node8height]); Lib_风场信息Node8.a('node.bordercolor','rgba(192,0,0,1)'); Lib_风场信息Node8.a('node.borderwidth', 0); Lib_风场信息Node8.a('node.background','' || 'rgba(0,0,0,0)'); Lib_风场信息Node8.a('node.gradient',''); Lib_风场信息Node8.a('node.gradientcolor',''); Lib_风场信息Node8.a('node.text','-'); Lib_风场信息Node8.a('node.textalign','left'); Lib_风场信息Node8.a('node.textvAlign','middle'); Lib_风场信息Node8.a('node.textrect', [Lib_风场信息Node8textStart, 0, Lib_风场信息Node8textWidth, Lib_风场信息Node8height]); Lib_风场信息Node8.a('node.color','rgba(192,0,0,1)'); Lib_风场信息Node8.a('node.font',' '+ Lib_风场信息Node8fontSize + 'px "Arial"'); Lib_风场信息Node8.a('node.textvisible',true); Lib_风场信息Node8.a('node.linefeed',false); if (false) { Lib_风场信息Node8.a('node.textfunc',function(g) { g.beginPath(); var str=Lib_风场信息Node8.a('node.text') || '-'; var color=Lib_风场信息Node8.a('node.color') || 'rgba(192,0,0,1)'; canvasTextAutoLine(str,0,10.66664*0.5*_ratio.ratioY,Lib_风场信息Node8width,Lib_风场信息Node8height,10.66664*_ratio.ratioY,"left",color,' '+ Lib_风场信息Node8fontSize + 'px "Arial"', 0,g); }); } if (false) { Lib_风场信息Node8.a('node.underlinepoints',[Lib_风场信息Node8lineStart, (13 - 10.66664) * 0.5 * _ratio.ratioY + Lib_风场信息Node8fontSize + 2 , ht.Default.getTextSize('-', ' '+ Lib_风场信息Node8fontSize + 'px "Arial"').width + 6, (Lib_风场信息Node8height - Lib_风场信息Node8fontSize) * 0.5*_ratio.ratioY + Lib_风场信息Node8fontSize + 2 ]); Lib_风场信息Node8.a('node.underlinevisible',false); Lib_风场信息Node8.a('node.underlineBorderWidth', 1); } dataModel.add(Lib_风场信息Node8); zoomNodeList.push({ node: Lib_风场信息Node8, borderWidth: 0, attr: 'node.borderwidth' }); _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio); var Lib_风场信息Node9 = new ht.Node(); var Lib_风场信息Node9textStart, Lib_风场信息Node9textWidth, Lib_风场信息Node9lineStart, Lib_风场信息Node9align = 'left', Lib_风场信息Node9fontSize = 10.66664*_ratio.ratioY,Lib_风场信息Node9width = 35*_ratio.ratioX, Lib_风场信息Node9height = 13*_ratio.ratioY; (function () { if (Lib_风场信息Node9align === 'left') { Lib_风场信息Node9textStart = Lib_风场信息Node9fontSize * 0.2 > 2 ? Lib_风场信息Node9fontSize * 0.2 - 4 : Lib_风场信息Node9fontSize * 0.2 - 9; Lib_风场信息Node9textWidth = Lib_风场信息Node9width; Lib_风场信息Node9lineStart = 1; } else if (Lib_风场信息Node9align === 'right') { Lib_风场信息Node9textStart = 0; Lib_风场信息Node9textWidth =Lib_风场信息Node9fontSize <= 8 ? Lib_风场信息Node9width + Lib_风场信息Node9fontSize * 0.2 + 6 : Lib_风场信息Node9width - Lib_风场信息Node9fontSize * 0.2; Lib_风场信息Node9lineStart = (Lib_风场信息Node9width - (ht.Default.getTextSize('万kwh', ' '+ Lib_风场信息Node9fontSize + 'px "Arial"').width + 6)) * 0.5; } else if (Lib_风场信息Node9align === 'center') { Lib_风场信息Node9textStart = -3; Lib_风场信息Node9textWidth = Lib_风场信息Node9width; Lib_风场信息Node9lineStart = Lib_风场信息Node9width - ht.Default.getTextSize('万kwh', ' '+ Lib_风场信息Node9fontSize + 'px "Arial"').width - 11; } })(); Lib_风场信息Node9.setImage(GD.getTextJSON(Lib_风场信息Node9width, Lib_风场信息Node9height, true, false, false, ' '+ Lib_风场信息Node9fontSize + 'px "Arial"')) Lib_风场信息Node9.setPosition(124*ratio.ratioX, 74*ratio.ratioY); Lib_风场信息Node9.setWidth(Lib_风场信息Node9width); Lib_风场信息Node9.setHeight(Lib_风场信息Node9height); Lib_风场信息Node9._nodeType = 'text'; Lib_风场信息Node9._disallowEvert = true; Lib_风场信息Node9.setRotation(0*Math.PI/180); Lib_风场信息Node9.a('node.width', Lib_风场信息Node9width); Lib_风场信息Node9.a('node.height', Lib_风场信息Node9height); Lib_风场信息Node9.a('node.rect', [0, 0, Lib_风场信息Node9width, Lib_风场信息Node9height]); Lib_风场信息Node9.a('node.bordercolor','rgba(0,0,0,1)'); Lib_风场信息Node9.a('node.borderwidth', 0); Lib_风场信息Node9.a('node.background','' || 'rgba(0,0,0,0)'); Lib_风场信息Node9.a('node.gradient',''); Lib_风场信息Node9.a('node.gradientcolor',''); Lib_风场信息Node9.a('node.text','万kwh'); Lib_风场信息Node9.a('node.textalign','left'); Lib_风场信息Node9.a('node.textvAlign','middle'); Lib_风场信息Node9.a('node.textrect', [Lib_风场信息Node9textStart, 0, Lib_风场信息Node9textWidth, Lib_风场信息Node9height]); Lib_风场信息Node9.a('node.color','rgba(0,0,0,1)'); Lib_风场信息Node9.a('node.font',' '+ Lib_风场信息Node9fontSize + 'px "Arial"'); Lib_风场信息Node9.a('node.textvisible',true); Lib_风场信息Node9.a('node.linefeed',false); if (false) { Lib_风场信息Node9.a('node.textfunc',function(g) { g.beginPath(); var str=Lib_风场信息Node9.a('node.text') || '万kwh'; var color=Lib_风场信息Node9.a('node.color') || 'rgba(0,0,0,1)'; canvasTextAutoLine(str,0,10.66664*0.5*_ratio.ratioY,Lib_风场信息Node9width,Lib_风场信息Node9height,10.66664*_ratio.ratioY,"left",color,' '+ Lib_风场信息Node9fontSize + 'px "Arial"', 0,g); }); } if (false) { Lib_风场信息Node9.a('node.underlinepoints',[Lib_风场信息Node9lineStart, (13 - 10.66664) * 0.5 * _ratio.ratioY + Lib_风场信息Node9fontSize + 2 , ht.Default.getTextSize('万kwh', ' '+ Lib_风场信息Node9fontSize + 'px "Arial"').width + 6, (Lib_风场信息Node9height - Lib_风场信息Node9fontSize) * 0.5*_ratio.ratioY + Lib_风场信息Node9fontSize + 2 ]); Lib_风场信息Node9.a('node.underlinevisible',false); Lib_风场信息Node9.a('node.underlineBorderWidth', 1); } dataModel.add(Lib_风场信息Node9); zoomNodeList.push({ node: Lib_风场信息Node9, borderWidth: 0, attr: 'node.borderwidth' }); _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio); var Lib_风场信息Node10 = new ht.Node(); var Lib_风场信息Node10textStart, Lib_风场信息Node10textWidth, Lib_风场信息Node10lineStart, Lib_风场信息Node10align = 'left', Lib_风场信息Node10fontSize = 10.66664*_ratio.ratioY,Lib_风场信息Node10width = 51*_ratio.ratioX, Lib_风场信息Node10height = 13*_ratio.ratioY; (function () { if (Lib_风场信息Node10align === 'left') { Lib_风场信息Node10textStart = Lib_风场信息Node10fontSize * 0.2 > 2 ? Lib_风场信息Node10fontSize * 0.2 - 4 : Lib_风场信息Node10fontSize * 0.2 - 9; Lib_风场信息Node10textWidth = Lib_风场信息Node10width; Lib_风场信息Node10lineStart = 1; } else if (Lib_风场信息Node10align === 'right') { Lib_风场信息Node10textStart = 0; Lib_风场信息Node10textWidth =Lib_风场信息Node10fontSize <= 8 ? Lib_风场信息Node10width + Lib_风场信息Node10fontSize * 0.2 + 6 : Lib_风场信息Node10width - Lib_风场信息Node10fontSize * 0.2; Lib_风场信息Node10lineStart = (Lib_风场信息Node10width - (ht.Default.getTextSize('日发电量', ' '+ Lib_风场信息Node10fontSize + 'px "Arial"').width + 6)) * 0.5; } else if (Lib_风场信息Node10align === 'center') { Lib_风场信息Node10textStart = -3; Lib_风场信息Node10textWidth = Lib_风场信息Node10width; Lib_风场信息Node10lineStart = Lib_风场信息Node10width - ht.Default.getTextSize('日发电量', ' '+ Lib_风场信息Node10fontSize + 'px "Arial"').width - 11; } })(); Lib_风场信息Node10.setImage(GD.getTextJSON(Lib_风场信息Node10width, Lib_风场信息Node10height, true, false, false, ' '+ Lib_风场信息Node10fontSize + 'px "Arial"')) Lib_风场信息Node10.setPosition(32*ratio.ratioX, 100*ratio.ratioY); Lib_风场信息Node10.setWidth(Lib_风场信息Node10width); Lib_风场信息Node10.setHeight(Lib_风场信息Node10height); Lib_风场信息Node10._nodeType = 'text'; Lib_风场信息Node10._disallowEvert = true; Lib_风场信息Node10.setRotation(0*Math.PI/180); Lib_风场信息Node10.a('node.width', Lib_风场信息Node10width); Lib_风场信息Node10.a('node.height', Lib_风场信息Node10height); Lib_风场信息Node10.a('node.rect', [0, 0, Lib_风场信息Node10width, Lib_风场信息Node10height]); Lib_风场信息Node10.a('node.bordercolor','rgba(0,0,0,1)'); Lib_风场信息Node10.a('node.borderwidth', 0); Lib_风场信息Node10.a('node.background','' || 'rgba(0,0,0,0)'); Lib_风场信息Node10.a('node.gradient',''); Lib_风场信息Node10.a('node.gradientcolor',''); Lib_风场信息Node10.a('node.text','日发电量'); Lib_风场信息Node10.a('node.textalign','left'); Lib_风场信息Node10.a('node.textvAlign','middle'); Lib_风场信息Node10.a('node.textrect', [Lib_风场信息Node10textStart, 0, Lib_风场信息Node10textWidth, Lib_风场信息Node10height]); Lib_风场信息Node10.a('node.color','rgba(0,0,0,1)'); Lib_风场信息Node10.a('node.font',' '+ Lib_风场信息Node10fontSize + 'px "Arial"'); Lib_风场信息Node10.a('node.textvisible',true); Lib_风场信息Node10.a('node.linefeed',false); if (false) { Lib_风场信息Node10.a('node.textfunc',function(g) { g.beginPath(); var str=Lib_风场信息Node10.a('node.text') || '日发电量'; var color=Lib_风场信息Node10.a('node.color') || 'rgba(0,0,0,1)'; canvasTextAutoLine(str,0,10.66664*0.5*_ratio.ratioY,Lib_风场信息Node10width,Lib_风场信息Node10height,10.66664*_ratio.ratioY,"left",color,' '+ Lib_风场信息Node10fontSize + 'px "Arial"', 0,g); }); } if (false) { Lib_风场信息Node10.a('node.underlinepoints',[Lib_风场信息Node10lineStart, (13 - 10.66664) * 0.5 * _ratio.ratioY + Lib_风场信息Node10fontSize + 2 , ht.Default.getTextSize('日发电量', ' '+ Lib_风场信息Node10fontSize + 'px "Arial"').width + 6, (Lib_风场信息Node10height - Lib_风场信息Node10fontSize) * 0.5*_ratio.ratioY + Lib_风场信息Node10fontSize + 2 ]); Lib_风场信息Node10.a('node.underlinevisible',false); Lib_风场信息Node10.a('node.underlineBorderWidth', 1); } dataModel.add(Lib_风场信息Node10); zoomNodeList.push({ node: Lib_风场信息Node10, borderWidth: 0, attr: 'node.borderwidth' }); _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio); var Lib_风场信息Node11 = new ht.Node(); var Lib_风场信息Node11textStart, Lib_风场信息Node11textWidth, Lib_风场信息Node11lineStart, Lib_风场信息Node11align = 'left', Lib_风场信息Node11fontSize = 10.66664*_ratio.ratioY,Lib_风场信息Node11width = 7*_ratio.ratioX, Lib_风场信息Node11height = 13*_ratio.ratioY; (function () { if (Lib_风场信息Node11align === 'left') { Lib_风场信息Node11textStart = Lib_风场信息Node11fontSize * 0.2 > 2 ? Lib_风场信息Node11fontSize * 0.2 - 4 : Lib_风场信息Node11fontSize * 0.2 - 9; Lib_风场信息Node11textWidth = Lib_风场信息Node11width; Lib_风场信息Node11lineStart = 1; } else if (Lib_风场信息Node11align === 'right') { Lib_风场信息Node11textStart = 0; Lib_风场信息Node11textWidth =Lib_风场信息Node11fontSize <= 8 ? Lib_风场信息Node11width + Lib_风场信息Node11fontSize * 0.2 + 6 : Lib_风场信息Node11width - Lib_风场信息Node11fontSize * 0.2; Lib_风场信息Node11lineStart = (Lib_风场信息Node11width - (ht.Default.getTextSize('-', ' '+ Lib_风场信息Node11fontSize + 'px "Arial"').width + 6)) * 0.5; } else if (Lib_风场信息Node11align === 'center') { Lib_风场信息Node11textStart = -3; Lib_风场信息Node11textWidth = Lib_风场信息Node11width; Lib_风场信息Node11lineStart = Lib_风场信息Node11width - ht.Default.getTextSize('-', ' '+ Lib_风场信息Node11fontSize + 'px "Arial"').width - 11; } })(); Lib_风场信息Node11.setImage(GD.getTextJSON(Lib_风场信息Node11width, Lib_风场信息Node11height, true, false, false, ' '+ Lib_风场信息Node11fontSize + 'px "Arial"')) Lib_风场信息Node11.setPosition(74*ratio.ratioX, 100*ratio.ratioY); Lib_风场信息Node11.setWidth(Lib_风场信息Node11width); Lib_风场信息Node11.setHeight(Lib_风场信息Node11height); Lib_风场信息Node11._nodeType = 'text'; Lib_风场信息Node11._disallowEvert = true; Lib_风场信息Node11.setRotation(0*Math.PI/180); Lib_风场信息Node11.a('node.width', Lib_风场信息Node11width); Lib_风场信息Node11.a('node.height', Lib_风场信息Node11height); Lib_风场信息Node11.a('node.rect', [0, 0, Lib_风场信息Node11width, Lib_风场信息Node11height]); Lib_风场信息Node11.a('node.bordercolor','rgba(192,0,0,1)'); Lib_风场信息Node11.a('node.borderwidth', 0); Lib_风场信息Node11.a('node.background','' || 'rgba(0,0,0,0)'); Lib_风场信息Node11.a('node.gradient',''); Lib_风场信息Node11.a('node.gradientcolor',''); Lib_风场信息Node11.a('node.text','-'); Lib_风场信息Node11.a('node.textalign','left'); Lib_风场信息Node11.a('node.textvAlign','middle'); Lib_风场信息Node11.a('node.textrect', [Lib_风场信息Node11textStart, 0, Lib_风场信息Node11textWidth, Lib_风场信息Node11height]); Lib_风场信息Node11.a('node.color','rgba(192,0,0,1)'); Lib_风场信息Node11.a('node.font',' '+ Lib_风场信息Node11fontSize + 'px "Arial"'); Lib_风场信息Node11.a('node.textvisible',true); Lib_风场信息Node11.a('node.linefeed',false); if (false) { Lib_风场信息Node11.a('node.textfunc',function(g) { g.beginPath(); var str=Lib_风场信息Node11.a('node.text') || '-'; var color=Lib_风场信息Node11.a('node.color') || 'rgba(192,0,0,1)'; canvasTextAutoLine(str,0,10.66664*0.5*_ratio.ratioY,Lib_风场信息Node11width,Lib_风场信息Node11height,10.66664*_ratio.ratioY,"left",color,' '+ Lib_风场信息Node11fontSize + 'px "Arial"', 0,g); }); } if (false) { Lib_风场信息Node11.a('node.underlinepoints',[Lib_风场信息Node11lineStart, (13 - 10.66664) * 0.5 * _ratio.ratioY + Lib_风场信息Node11fontSize + 2 , ht.Default.getTextSize('-', ' '+ Lib_风场信息Node11fontSize + 'px "Arial"').width + 6, (Lib_风场信息Node11height - Lib_风场信息Node11fontSize) * 0.5*_ratio.ratioY + Lib_风场信息Node11fontSize + 2 ]); Lib_风场信息Node11.a('node.underlinevisible',false); Lib_风场信息Node11.a('node.underlineBorderWidth', 1); } dataModel.add(Lib_风场信息Node11); zoomNodeList.push({ node: Lib_风场信息Node11, borderWidth: 0, attr: 'node.borderwidth' }); _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio); var Lib_风场信息Node12 = new ht.Node(); var Lib_风场信息Node12textStart, Lib_风场信息Node12textWidth, Lib_风场信息Node12lineStart, Lib_风场信息Node12align = 'left', Lib_风场信息Node12fontSize = 10.66664*_ratio.ratioY,Lib_风场信息Node12width = 35*_ratio.ratioX, Lib_风场信息Node12height = 13*_ratio.ratioY; (function () { if (Lib_风场信息Node12align === 'left') { Lib_风场信息Node12textStart = Lib_风场信息Node12fontSize * 0.2 > 2 ? Lib_风场信息Node12fontSize * 0.2 - 4 : Lib_风场信息Node12fontSize * 0.2 - 9; Lib_风场信息Node12textWidth = Lib_风场信息Node12width; Lib_风场信息Node12lineStart = 1; } else if (Lib_风场信息Node12align === 'right') { Lib_风场信息Node12textStart = 0; Lib_风场信息Node12textWidth =Lib_风场信息Node12fontSize <= 8 ? Lib_风场信息Node12width + Lib_风场信息Node12fontSize * 0.2 + 6 : Lib_风场信息Node12width - Lib_风场信息Node12fontSize * 0.2; Lib_风场信息Node12lineStart = (Lib_风场信息Node12width - (ht.Default.getTextSize('万kwh', ' '+ Lib_风场信息Node12fontSize + 'px "Arial"').width + 6)) * 0.5; } else if (Lib_风场信息Node12align === 'center') { Lib_风场信息Node12textStart = -3; Lib_风场信息Node12textWidth = Lib_风场信息Node12width; Lib_风场信息Node12lineStart = Lib_风场信息Node12width - ht.Default.getTextSize('万kwh', ' '+ Lib_风场信息Node12fontSize + 'px "Arial"').width - 11; } })(); Lib_风场信息Node12.setImage(GD.getTextJSON(Lib_风场信息Node12width, Lib_风场信息Node12height, true, false, false, ' '+ Lib_风场信息Node12fontSize + 'px "Arial"')) Lib_风场信息Node12.setPosition(124*ratio.ratioX, 100*ratio.ratioY); Lib_风场信息Node12.setWidth(Lib_风场信息Node12width); Lib_风场信息Node12.setHeight(Lib_风场信息Node12height); Lib_风场信息Node12._nodeType = 'text'; Lib_风场信息Node12._disallowEvert = true; Lib_风场信息Node12.setRotation(0*Math.PI/180); Lib_风场信息Node12.a('node.width', Lib_风场信息Node12width); Lib_风场信息Node12.a('node.height', Lib_风场信息Node12height); Lib_风场信息Node12.a('node.rect', [0, 0, Lib_风场信息Node12width, Lib_风场信息Node12height]); Lib_风场信息Node12.a('node.bordercolor','rgba(0,0,0,1)'); Lib_风场信息Node12.a('node.borderwidth', 0); Lib_风场信息Node12.a('node.background','' || 'rgba(0,0,0,0)'); Lib_风场信息Node12.a('node.gradient',''); Lib_风场信息Node12.a('node.gradientcolor',''); Lib_风场信息Node12.a('node.text','万kwh'); Lib_风场信息Node12.a('node.textalign','left'); Lib_风场信息Node12.a('node.textvAlign','middle'); Lib_风场信息Node12.a('node.textrect', [Lib_风场信息Node12textStart, 0, Lib_风场信息Node12textWidth, Lib_风场信息Node12height]); Lib_风场信息Node12.a('node.color','rgba(0,0,0,1)'); Lib_风场信息Node12.a('node.font',' '+ Lib_风场信息Node12fontSize + 'px "Arial"'); Lib_风场信息Node12.a('node.textvisible',true); Lib_风场信息Node12.a('node.linefeed',false); if (false) { Lib_风场信息Node12.a('node.textfunc',function(g) { g.beginPath(); var str=Lib_风场信息Node12.a('node.text') || '万kwh'; var color=Lib_风场信息Node12.a('node.color') || 'rgba(0,0,0,1)'; canvasTextAutoLine(str,0,10.66664*0.5*_ratio.ratioY,Lib_风场信息Node12width,Lib_风场信息Node12height,10.66664*_ratio.ratioY,"left",color,' '+ Lib_风场信息Node12fontSize + 'px "Arial"', 0,g); }); } if (false) { Lib_风场信息Node12.a('node.underlinepoints',[Lib_风场信息Node12lineStart, (13 - 10.66664) * 0.5 * _ratio.ratioY + Lib_风场信息Node12fontSize + 2 , ht.Default.getTextSize('万kwh', ' '+ Lib_风场信息Node12fontSize + 'px "Arial"').width + 6, (Lib_风场信息Node12height - Lib_风场信息Node12fontSize) * 0.5*_ratio.ratioY + Lib_风场信息Node12fontSize + 2 ]); Lib_风场信息Node12.a('node.underlinevisible',false); Lib_风场信息Node12.a('node.underlineBorderWidth', 1); } dataModel.add(Lib_风场信息Node12); zoomNodeList.push({ node: Lib_风场信息Node12, borderWidth: 0, attr: 'node.borderwidth' }); _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio); var Lib_风场信息Node13 = new ht.Node(); var Lib_风场信息Node13textStart, Lib_风场信息Node13textWidth, Lib_风场信息Node13lineStart, Lib_风场信息Node13align = 'left', Lib_风场信息Node13fontSize = 10.66664*_ratio.ratioY,Lib_风场信息Node13width = 51*_ratio.ratioX, Lib_风场信息Node13height = 13*_ratio.ratioY; (function () { if (Lib_风场信息Node13align === 'left') { Lib_风场信息Node13textStart = Lib_风场信息Node13fontSize * 0.2 > 2 ? Lib_风场信息Node13fontSize * 0.2 - 4 : Lib_风场信息Node13fontSize * 0.2 - 9; Lib_风场信息Node13textWidth = Lib_风场信息Node13width; Lib_风场信息Node13lineStart = 1; } else if (Lib_风场信息Node13align === 'right') { Lib_风场信息Node13textStart = 0; Lib_风场信息Node13textWidth =Lib_风场信息Node13fontSize <= 8 ? Lib_风场信息Node13width + Lib_风场信息Node13fontSize * 0.2 + 6 : Lib_风场信息Node13width - Lib_风场信息Node13fontSize * 0.2; Lib_风场信息Node13lineStart = (Lib_风场信息Node13width - (ht.Default.getTextSize('有功功率', ' '+ Lib_风场信息Node13fontSize + 'px "Arial"').width + 6)) * 0.5; } else if (Lib_风场信息Node13align === 'center') { Lib_风场信息Node13textStart = -3; Lib_风场信息Node13textWidth = Lib_风场信息Node13width; Lib_风场信息Node13lineStart = Lib_风场信息Node13width - ht.Default.getTextSize('有功功率', ' '+ Lib_风场信息Node13fontSize + 'px "Arial"').width - 11; } })(); Lib_风场信息Node13.setImage(GD.getTextJSON(Lib_风场信息Node13width, Lib_风场信息Node13height, true, false, false, ' '+ Lib_风场信息Node13fontSize + 'px "Arial"')) Lib_风场信息Node13.setPosition(32*ratio.ratioX, 127*ratio.ratioY); Lib_风场信息Node13.setWidth(Lib_风场信息Node13width); Lib_风场信息Node13.setHeight(Lib_风场信息Node13height); Lib_风场信息Node13._nodeType = 'text'; Lib_风场信息Node13._disallowEvert = true; Lib_风场信息Node13.setRotation(0*Math.PI/180); Lib_风场信息Node13.a('node.width', Lib_风场信息Node13width); Lib_风场信息Node13.a('node.height', Lib_风场信息Node13height); Lib_风场信息Node13.a('node.rect', [0, 0, Lib_风场信息Node13width, Lib_风场信息Node13height]); Lib_风场信息Node13.a('node.bordercolor','rgba(0,0,0,1)'); Lib_风场信息Node13.a('node.borderwidth', 0); Lib_风场信息Node13.a('node.background','' || 'rgba(0,0,0,0)'); Lib_风场信息Node13.a('node.gradient',''); Lib_风场信息Node13.a('node.gradientcolor',''); Lib_风场信息Node13.a('node.text','有功功率'); Lib_风场信息Node13.a('node.textalign','left'); Lib_风场信息Node13.a('node.textvAlign','middle'); Lib_风场信息Node13.a('node.textrect', [Lib_风场信息Node13textStart, 0, Lib_风场信息Node13textWidth, Lib_风场信息Node13height]); Lib_风场信息Node13.a('node.color','rgba(0,0,0,1)'); Lib_风场信息Node13.a('node.font',' '+ Lib_风场信息Node13fontSize + 'px "Arial"'); Lib_风场信息Node13.a('node.textvisible',true); Lib_风场信息Node13.a('node.linefeed',false); if (false) { Lib_风场信息Node13.a('node.textfunc',function(g) { g.beginPath(); var str=Lib_风场信息Node13.a('node.text') || '有功功率'; var color=Lib_风场信息Node13.a('node.color') || 'rgba(0,0,0,1)'; canvasTextAutoLine(str,0,10.66664*0.5*_ratio.ratioY,Lib_风场信息Node13width,Lib_风场信息Node13height,10.66664*_ratio.ratioY,"left",color,' '+ Lib_风场信息Node13fontSize + 'px "Arial"', 0,g); }); } if (false) { Lib_风场信息Node13.a('node.underlinepoints',[Lib_风场信息Node13lineStart, (13 - 10.66664) * 0.5 * _ratio.ratioY + Lib_风场信息Node13fontSize + 2 , ht.Default.getTextSize('有功功率', ' '+ Lib_风场信息Node13fontSize + 'px "Arial"').width + 6, (Lib_风场信息Node13height - Lib_风场信息Node13fontSize) * 0.5*_ratio.ratioY + Lib_风场信息Node13fontSize + 2 ]); Lib_风场信息Node13.a('node.underlinevisible',false); Lib_风场信息Node13.a('node.underlineBorderWidth', 1); } dataModel.add(Lib_风场信息Node13); zoomNodeList.push({ node: Lib_风场信息Node13, borderWidth: 0, attr: 'node.borderwidth' }); _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio); var Lib_风场信息Node14 = new ht.Node(); var Lib_风场信息Node14textStart, Lib_风场信息Node14textWidth, Lib_风场信息Node14lineStart, Lib_风场信息Node14align = 'left', Lib_风场信息Node14fontSize = 10.66664*_ratio.ratioY,Lib_风场信息Node14width = 7*_ratio.ratioX, Lib_风场信息Node14height = 13*_ratio.ratioY; (function () { if (Lib_风场信息Node14align === 'left') { Lib_风场信息Node14textStart = Lib_风场信息Node14fontSize * 0.2 > 2 ? Lib_风场信息Node14fontSize * 0.2 - 4 : Lib_风场信息Node14fontSize * 0.2 - 9; Lib_风场信息Node14textWidth = Lib_风场信息Node14width; Lib_风场信息Node14lineStart = 1; } else if (Lib_风场信息Node14align === 'right') { Lib_风场信息Node14textStart = 0; Lib_风场信息Node14textWidth =Lib_风场信息Node14fontSize <= 8 ? Lib_风场信息Node14width + Lib_风场信息Node14fontSize * 0.2 + 6 : Lib_风场信息Node14width - Lib_风场信息Node14fontSize * 0.2; Lib_风场信息Node14lineStart = (Lib_风场信息Node14width - (ht.Default.getTextSize('-', ' '+ Lib_风场信息Node14fontSize + 'px "Arial"').width + 6)) * 0.5; } else if (Lib_风场信息Node14align === 'center') { Lib_风场信息Node14textStart = -3; Lib_风场信息Node14textWidth = Lib_风场信息Node14width; Lib_风场信息Node14lineStart = Lib_风场信息Node14width - ht.Default.getTextSize('-', ' '+ Lib_风场信息Node14fontSize + 'px "Arial"').width - 11; } })(); Lib_风场信息Node14.setImage(GD.getTextJSON(Lib_风场信息Node14width, Lib_风场信息Node14height, true, false, false, ' '+ Lib_风场信息Node14fontSize + 'px "Arial"')) Lib_风场信息Node14.setPosition(74*ratio.ratioX, 127*ratio.ratioY); Lib_风场信息Node14.setWidth(Lib_风场信息Node14width); Lib_风场信息Node14.setHeight(Lib_风场信息Node14height); Lib_风场信息Node14._nodeType = 'text'; Lib_风场信息Node14._disallowEvert = true; Lib_风场信息Node14.setRotation(0*Math.PI/180); Lib_风场信息Node14.a('node.width', Lib_风场信息Node14width); Lib_风场信息Node14.a('node.height', Lib_风场信息Node14height); Lib_风场信息Node14.a('node.rect', [0, 0, Lib_风场信息Node14width, Lib_风场信息Node14height]); Lib_风场信息Node14.a('node.bordercolor','rgba(192,0,0,1)'); Lib_风场信息Node14.a('node.borderwidth', 0); Lib_风场信息Node14.a('node.background','' || 'rgba(0,0,0,0)'); Lib_风场信息Node14.a('node.gradient',''); Lib_风场信息Node14.a('node.gradientcolor',''); Lib_风场信息Node14.a('node.text','-'); Lib_风场信息Node14.a('node.textalign','left'); Lib_风场信息Node14.a('node.textvAlign','middle'); Lib_风场信息Node14.a('node.textrect', [Lib_风场信息Node14textStart, 0, Lib_风场信息Node14textWidth, Lib_风场信息Node14height]); Lib_风场信息Node14.a('node.color','rgba(192,0,0,1)'); Lib_风场信息Node14.a('node.font',' '+ Lib_风场信息Node14fontSize + 'px "Arial"'); Lib_风场信息Node14.a('node.textvisible',true); Lib_风场信息Node14.a('node.linefeed',false); if (false) { Lib_风场信息Node14.a('node.textfunc',function(g) { g.beginPath(); var str=Lib_风场信息Node14.a('node.text') || '-'; var color=Lib_风场信息Node14.a('node.color') || 'rgba(192,0,0,1)'; canvasTextAutoLine(str,0,10.66664*0.5*_ratio.ratioY,Lib_风场信息Node14width,Lib_风场信息Node14height,10.66664*_ratio.ratioY,"left",color,' '+ Lib_风场信息Node14fontSize + 'px "Arial"', 0,g); }); } if (false) { Lib_风场信息Node14.a('node.underlinepoints',[Lib_风场信息Node14lineStart, (13 - 10.66664) * 0.5 * _ratio.ratioY + Lib_风场信息Node14fontSize + 2 , ht.Default.getTextSize('-', ' '+ Lib_风场信息Node14fontSize + 'px "Arial"').width + 6, (Lib_风场信息Node14height - Lib_风场信息Node14fontSize) * 0.5*_ratio.ratioY + Lib_风场信息Node14fontSize + 2 ]); Lib_风场信息Node14.a('node.underlinevisible',false); Lib_风场信息Node14.a('node.underlineBorderWidth', 1); } dataModel.add(Lib_风场信息Node14); zoomNodeList.push({ node: Lib_风场信息Node14, borderWidth: 0, attr: 'node.borderwidth' }); _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio); var Lib_风场信息Node15 = new ht.Node(); var Lib_风场信息Node15textStart, Lib_风场信息Node15textWidth, Lib_风场信息Node15lineStart, Lib_风场信息Node15align = 'left', Lib_风场信息Node15fontSize = 10.66664*_ratio.ratioY,Lib_风场信息Node15width = 35*_ratio.ratioX, Lib_风场信息Node15height = 13*_ratio.ratioY; (function () { if (Lib_风场信息Node15align === 'left') { Lib_风场信息Node15textStart = Lib_风场信息Node15fontSize * 0.2 > 2 ? Lib_风场信息Node15fontSize * 0.2 - 4 : Lib_风场信息Node15fontSize * 0.2 - 9; Lib_风场信息Node15textWidth = Lib_风场信息Node15width; Lib_风场信息Node15lineStart = 1; } else if (Lib_风场信息Node15align === 'right') { Lib_风场信息Node15textStart = 0; Lib_风场信息Node15textWidth =Lib_风场信息Node15fontSize <= 8 ? Lib_风场信息Node15width + Lib_风场信息Node15fontSize * 0.2 + 6 : Lib_风场信息Node15width - Lib_风场信息Node15fontSize * 0.2; Lib_风场信息Node15lineStart = (Lib_风场信息Node15width - (ht.Default.getTextSize('万kwh', ' '+ Lib_风场信息Node15fontSize + 'px "Arial"').width + 6)) * 0.5; } else if (Lib_风场信息Node15align === 'center') { Lib_风场信息Node15textStart = -3; Lib_风场信息Node15textWidth = Lib_风场信息Node15width; Lib_风场信息Node15lineStart = Lib_风场信息Node15width - ht.Default.getTextSize('万kwh', ' '+ Lib_风场信息Node15fontSize + 'px "Arial"').width - 11; } })(); Lib_风场信息Node15.setImage(GD.getTextJSON(Lib_风场信息Node15width, Lib_风场信息Node15height, true, false, false, ' '+ Lib_风场信息Node15fontSize + 'px "Arial"')) Lib_风场信息Node15.setPosition(124*ratio.ratioX, 127*ratio.ratioY); Lib_风场信息Node15.setWidth(Lib_风场信息Node15width); Lib_风场信息Node15.setHeight(Lib_风场信息Node15height); Lib_风场信息Node15._nodeType = 'text'; Lib_风场信息Node15._disallowEvert = true; Lib_风场信息Node15.setRotation(0*Math.PI/180); Lib_风场信息Node15.a('node.width', Lib_风场信息Node15width); Lib_风场信息Node15.a('node.height', Lib_风场信息Node15height); Lib_风场信息Node15.a('node.rect', [0, 0, Lib_风场信息Node15width, Lib_风场信息Node15height]); Lib_风场信息Node15.a('node.bordercolor','rgba(0,0,0,1)'); Lib_风场信息Node15.a('node.borderwidth', 0); Lib_风场信息Node15.a('node.background','' || 'rgba(0,0,0,0)'); Lib_风场信息Node15.a('node.gradient',''); Lib_风场信息Node15.a('node.gradientcolor',''); Lib_风场信息Node15.a('node.text','万kwh'); Lib_风场信息Node15.a('node.textalign','left'); Lib_风场信息Node15.a('node.textvAlign','middle'); Lib_风场信息Node15.a('node.textrect', [Lib_风场信息Node15textStart, 0, Lib_风场信息Node15textWidth, Lib_风场信息Node15height]); Lib_风场信息Node15.a('node.color','rgba(0,0,0,1)'); Lib_风场信息Node15.a('node.font',' '+ Lib_风场信息Node15fontSize + 'px "Arial"'); Lib_风场信息Node15.a('node.textvisible',true); Lib_风场信息Node15.a('node.linefeed',false); if (false) { Lib_风场信息Node15.a('node.textfunc',function(g) { g.beginPath(); var str=Lib_风场信息Node15.a('node.text') || '万kwh'; var color=Lib_风场信息Node15.a('node.color') || 'rgba(0,0,0,1)'; canvasTextAutoLine(str,0,10.66664*0.5*_ratio.ratioY,Lib_风场信息Node15width,Lib_风场信息Node15height,10.66664*_ratio.ratioY,"left",color,' '+ Lib_风场信息Node15fontSize + 'px "Arial"', 0,g); }); } if (false) { Lib_风场信息Node15.a('node.underlinepoints',[Lib_风场信息Node15lineStart, (13 - 10.66664) * 0.5 * _ratio.ratioY + Lib_风场信息Node15fontSize + 2 , ht.Default.getTextSize('万kwh', ' '+ Lib_风场信息Node15fontSize + 'px "Arial"').width + 6, (Lib_风场信息Node15height - Lib_风场信息Node15fontSize) * 0.5*_ratio.ratioY + Lib_风场信息Node15fontSize + 2 ]); Lib_风场信息Node15.a('node.underlinevisible',false); Lib_风场信息Node15.a('node.underlineBorderWidth', 1); } dataModel.add(Lib_风场信息Node15); zoomNodeList.push({ node: Lib_风场信息Node15, borderWidth: 0, attr: 'node.borderwidth' }); /*@GraphList@*/ /*@PageInit@*/ var localVarObj = this.localVarObj; var localDynamicVarObj = this.localDynamicVar(); var fengjitaishu= localVarObj.fengjitaishu || localDynamicVarObj.fengjitaishu; var zhuangjirongliang= localVarObj.zhuangjirongliang || localDynamicVarObj.zhuangjirongliang; var pingjunfengsu= localVarObj.pingjunfengsu || localDynamicVarObj.pingjunfengsu; var rifadianliang= localVarObj.rifadianliang || localDynamicVarObj.rifadianliang; var yougonggonglv= localVarObj.yougonggonglv || localDynamicVarObj.yougonggonglv; this['Lib_风场信息Node0'] = Lib_风场信息Node0; Lib_风场信息Node0.__parentLib = nodename; Lib_风场信息Node0.__parent = this; this.childNodes.push(Lib_风场信息Node0); this['Lib_风场信息Node1'] = Lib_风场信息Node1; Lib_风场信息Node1.__parentLib = nodename; Lib_风场信息Node1.__parent = this; this.childNodes.push(Lib_风场信息Node1); this['Lib_风场信息Node2'] = Lib_风场信息Node2; Lib_风场信息Node2.__parentLib = nodename; Lib_风场信息Node2.__parent = this; this.childNodes.push(Lib_风场信息Node2); this['Lib_风场信息Node3'] = Lib_风场信息Node3; Lib_风场信息Node3.__parentLib = nodename; Lib_风场信息Node3.__parent = this; this.childNodes.push(Lib_风场信息Node3); this['Lib_风场信息Node4'] = Lib_风场信息Node4; Lib_风场信息Node4.__parentLib = nodename; Lib_风场信息Node4.__parent = this; this.childNodes.push(Lib_风场信息Node4); this['Lib_风场信息Node5'] = Lib_风场信息Node5; Lib_风场信息Node5.__parentLib = nodename; Lib_风场信息Node5.__parent = this; this.childNodes.push(Lib_风场信息Node5); this['Lib_风场信息Node6'] = Lib_风场信息Node6; Lib_风场信息Node6.__parentLib = nodename; Lib_风场信息Node6.__parent = this; this.childNodes.push(Lib_风场信息Node6); this['Lib_风场信息Node7'] = Lib_风场信息Node7; Lib_风场信息Node7.__parentLib = nodename; Lib_风场信息Node7.__parent = this; this.childNodes.push(Lib_风场信息Node7); this['Lib_风场信息Node8'] = Lib_风场信息Node8; Lib_风场信息Node8.__parentLib = nodename; Lib_风场信息Node8.__parent = this; this.childNodes.push(Lib_风场信息Node8); this['Lib_风场信息Node9'] = Lib_风场信息Node9; Lib_风场信息Node9.__parentLib = nodename; Lib_风场信息Node9.__parent = this; this.childNodes.push(Lib_风场信息Node9); this['Lib_风场信息Node10'] = Lib_风场信息Node10; Lib_风场信息Node10.__parentLib = nodename; Lib_风场信息Node10.__parent = this; this.childNodes.push(Lib_风场信息Node10); this['Lib_风场信息Node11'] = Lib_风场信息Node11; Lib_风场信息Node11.__parentLib = nodename; Lib_风场信息Node11.__parent = this; this.childNodes.push(Lib_风场信息Node11); this['Lib_风场信息Node12'] = Lib_风场信息Node12; Lib_风场信息Node12.__parentLib = nodename; Lib_风场信息Node12.__parent = this; this.childNodes.push(Lib_风场信息Node12); this['Lib_风场信息Node13'] = Lib_风场信息Node13; Lib_风场信息Node13.__parentLib = nodename; Lib_风场信息Node13.__parent = this; this.childNodes.push(Lib_风场信息Node13); this['Lib_风场信息Node14'] = Lib_风场信息Node14; Lib_风场信息Node14.__parentLib = nodename; Lib_风场信息Node14.__parent = this; this.childNodes.push(Lib_风场信息Node14); this['Lib_风场信息Node15'] = Lib_风场信息Node15; Lib_风场信息Node15.__parentLib = nodename; Lib_风场信息Node15.__parent = this; this.childNodes.push(Lib_风场信息Node15); /*@ControlContextMenu@*/ /*@Declare@*/ this.init(x, y, width, height, angle); }; ht.Default.def('ht.lib.风场信息', Object, { refresh10ms: function () { var localVarObj = this.localVarObj; var localDynamicVarObj = this.localDynamicVar(); var fengjitaishu= localVarObj.fengjitaishu || localDynamicVarObj.fengjitaishu; var zhuangjirongliang= localVarObj.zhuangjirongliang || localDynamicVarObj.zhuangjirongliang; var pingjunfengsu= localVarObj.pingjunfengsu || localDynamicVarObj.pingjunfengsu; var rifadianliang= localVarObj.rifadianliang || localDynamicVarObj.rifadianliang; var yougonggonglv= localVarObj.yougonggonglv || localDynamicVarObj.yougonggonglv; var Lib_风场信息Node0= this.Lib_风场信息Node0; var Lib_风场信息Node1= this.Lib_风场信息Node1; var Lib_风场信息Node2= this.Lib_风场信息Node2; var Lib_风场信息Node3= this.Lib_风场信息Node3; var Lib_风场信息Node4= this.Lib_风场信息Node4; var Lib_风场信息Node5= this.Lib_风场信息Node5; var Lib_风场信息Node6= this.Lib_风场信息Node6; var Lib_风场信息Node7= this.Lib_风场信息Node7; var Lib_风场信息Node8= this.Lib_风场信息Node8; var Lib_风场信息Node9= this.Lib_风场信息Node9; var Lib_风场信息Node10= this.Lib_风场信息Node10; var Lib_风场信息Node11= this.Lib_风场信息Node11; var Lib_风场信息Node12= this.Lib_风场信息Node12; var Lib_风场信息Node13= this.Lib_风场信息Node13; var Lib_风场信息Node14= this.Lib_风场信息Node14; var Lib_风场信息Node15= this.Lib_风场信息Node15; /*@refresh10ms@*/ }, refresh100ms: function () { var localVarObj = this.localVarObj; var localDynamicVarObj = this.localDynamicVar(); var fengjitaishu= localVarObj.fengjitaishu || localDynamicVarObj.fengjitaishu; var zhuangjirongliang= localVarObj.zhuangjirongliang || localDynamicVarObj.zhuangjirongliang; var pingjunfengsu= localVarObj.pingjunfengsu || localDynamicVarObj.pingjunfengsu; var rifadianliang= localVarObj.rifadianliang || localDynamicVarObj.rifadianliang; var yougonggonglv= localVarObj.yougonggonglv || localDynamicVarObj.yougonggonglv; var Lib_风场信息Node0= this.Lib_风场信息Node0; var Lib_风场信息Node1= this.Lib_风场信息Node1; var Lib_风场信息Node2= this.Lib_风场信息Node2; var Lib_风场信息Node3= this.Lib_风场信息Node3; var Lib_风场信息Node4= this.Lib_风场信息Node4; var Lib_风场信息Node5= this.Lib_风场信息Node5; var Lib_风场信息Node6= this.Lib_风场信息Node6; var Lib_风场信息Node7= this.Lib_风场信息Node7; var Lib_风场信息Node8= this.Lib_风场信息Node8; var Lib_风场信息Node9= this.Lib_风场信息Node9; var Lib_风场信息Node10= this.Lib_风场信息Node10; var Lib_风场信息Node11= this.Lib_风场信息Node11; var Lib_风场信息Node12= this.Lib_风场信息Node12; var Lib_风场信息Node13= this.Lib_风场信息Node13; var Lib_风场信息Node14= this.Lib_风场信息Node14; var Lib_风场信息Node15= this.Lib_风场信息Node15; Lib_风场信息Node2.a('node.text',GetDital((getVarValue(fengjitaishu) ),-1)); Lib_风场信息Node5.a('node.text',GetDital((getVarValue(zhuangjirongliang) ),-1)); Lib_风场信息Node8.a('node.text',GetDital((getVarValue(pingjunfengsu) ),-1)); Lib_风场信息Node11.a('node.text',GetDital((getVarValue(rifadianliang) ),-1)); Lib_风场信息Node14.a('node.text',GetDital((getVarValue(yougonggonglv) ),-1)); /*@refresh100ms@*/ }, refresh500ms: function () { var localVarObj = this.localVarObj; var localDynamicVarObj = this.localDynamicVar(); var fengjitaishu= localVarObj.fengjitaishu || localDynamicVarObj.fengjitaishu; var zhuangjirongliang= localVarObj.zhuangjirongliang || localDynamicVarObj.zhuangjirongliang; var pingjunfengsu= localVarObj.pingjunfengsu || localDynamicVarObj.pingjunfengsu; var rifadianliang= localVarObj.rifadianliang || localDynamicVarObj.rifadianliang; var yougonggonglv= localVarObj.yougonggonglv || localDynamicVarObj.yougonggonglv; var Lib_风场信息Node0= this.Lib_风场信息Node0; var Lib_风场信息Node1= this.Lib_风场信息Node1; var Lib_风场信息Node2= this.Lib_风场信息Node2; var Lib_风场信息Node3= this.Lib_风场信息Node3; var Lib_风场信息Node4= this.Lib_风场信息Node4; var Lib_风场信息Node5= this.Lib_风场信息Node5; var Lib_风场信息Node6= this.Lib_风场信息Node6; var Lib_风场信息Node7= this.Lib_风场信息Node7; var Lib_风场信息Node8= this.Lib_风场信息Node8; var Lib_风场信息Node9= this.Lib_风场信息Node9; var Lib_风场信息Node10= this.Lib_风场信息Node10; var Lib_风场信息Node11= this.Lib_风场信息Node11; var Lib_风场信息Node12= this.Lib_风场信息Node12; var Lib_风场信息Node13= this.Lib_风场信息Node13; var Lib_风场信息Node14= this.Lib_风场信息Node14; var Lib_风场信息Node15= this.Lib_风场信息Node15; /*@refresh500ms@*/ }, refresh1s: function () { var Counter1s = arguments[0] || 0; var localVarObj = this.localVarObj; var localDynamicVarObj = this.localDynamicVar(); var fengjitaishu= localVarObj.fengjitaishu || localDynamicVarObj.fengjitaishu; var zhuangjirongliang= localVarObj.zhuangjirongliang || localDynamicVarObj.zhuangjirongliang; var pingjunfengsu= localVarObj.pingjunfengsu || localDynamicVarObj.pingjunfengsu; var rifadianliang= localVarObj.rifadianliang || localDynamicVarObj.rifadianliang; var yougonggonglv= localVarObj.yougonggonglv || localDynamicVarObj.yougonggonglv; var Lib_风场信息Node0= this.Lib_风场信息Node0; var Lib_风场信息Node1= this.Lib_风场信息Node1; var Lib_风场信息Node2= this.Lib_风场信息Node2; var Lib_风场信息Node3= this.Lib_风场信息Node3; var Lib_风场信息Node4= this.Lib_风场信息Node4; var Lib_风场信息Node5= this.Lib_风场信息Node5; var Lib_风场信息Node6= this.Lib_风场信息Node6; var Lib_风场信息Node7= this.Lib_风场信息Node7; var Lib_风场信息Node8= this.Lib_风场信息Node8; var Lib_风场信息Node9= this.Lib_风场信息Node9; var Lib_风场信息Node10= this.Lib_风场信息Node10; var Lib_风场信息Node11= this.Lib_风场信息Node11; var Lib_风场信息Node12= this.Lib_风场信息Node12; var Lib_风场信息Node13= this.Lib_风场信息Node13; var Lib_风场信息Node14= this.Lib_风场信息Node14; var Lib_风场信息Node15= this.Lib_风场信息Node15; /*@refresh1s@*/ }, refresh5s: function () { var localVarObj = this.localVarObj; var localDynamicVarObj = this.localDynamicVar(); var fengjitaishu= localVarObj.fengjitaishu || localDynamicVarObj.fengjitaishu; var zhuangjirongliang= localVarObj.zhuangjirongliang || localDynamicVarObj.zhuangjirongliang; var pingjunfengsu= localVarObj.pingjunfengsu || localDynamicVarObj.pingjunfengsu; var rifadianliang= localVarObj.rifadianliang || localDynamicVarObj.rifadianliang; var yougonggonglv= localVarObj.yougonggonglv || localDynamicVarObj.yougonggonglv; var Lib_风场信息Node0= this.Lib_风场信息Node0; var Lib_风场信息Node1= this.Lib_风场信息Node1; var Lib_风场信息Node2= this.Lib_风场信息Node2; var Lib_风场信息Node3= this.Lib_风场信息Node3; var Lib_风场信息Node4= this.Lib_风场信息Node4; var Lib_风场信息Node5= this.Lib_风场信息Node5; var Lib_风场信息Node6= this.Lib_风场信息Node6; var Lib_风场信息Node7= this.Lib_风场信息Node7; var Lib_风场信息Node8= this.Lib_风场信息Node8; var Lib_风场信息Node9= this.Lib_风场信息Node9; var Lib_风场信息Node10= this.Lib_风场信息Node10; var Lib_风场信息Node11= this.Lib_风场信息Node11; var Lib_风场信息Node12= this.Lib_风场信息Node12; var Lib_风场信息Node13= this.Lib_风场信息Node13; var Lib_风场信息Node14= this.Lib_风场信息Node14; var Lib_风场信息Node15= this.Lib_风场信息Node15; /*@refresh5s@*/ }, /*@PageDynamic@*/ onEvent: function (e, data, type, origin, offset, objMouseOn, ctm) { var localVarObj = this.localVarObj; var localDynamicVarObj = this.localDynamicVar(); var fengjitaishu= localVarObj.fengjitaishu || localDynamicVarObj.fengjitaishu; var zhuangjirongliang= localVarObj.zhuangjirongliang || localDynamicVarObj.zhuangjirongliang; var pingjunfengsu= localVarObj.pingjunfengsu || localDynamicVarObj.pingjunfengsu; var rifadianliang= localVarObj.rifadianliang || localDynamicVarObj.rifadianliang; var yougonggonglv= localVarObj.yougonggonglv || localDynamicVarObj.yougonggonglv; var Lib_风场信息Node0= this.Lib_风场信息Node0; var Lib_风场信息Node1= this.Lib_风场信息Node1; var Lib_风场信息Node2= this.Lib_风场信息Node2; var Lib_风场信息Node3= this.Lib_风场信息Node3; var Lib_风场信息Node4= this.Lib_风场信息Node4; var Lib_风场信息Node5= this.Lib_风场信息Node5; var Lib_风场信息Node6= this.Lib_风场信息Node6; var Lib_风场信息Node7= this.Lib_风场信息Node7; var Lib_风场信息Node8= this.Lib_风场信息Node8; var Lib_风场信息Node9= this.Lib_风场信息Node9; var Lib_风场信息Node10= this.Lib_风场信息Node10; var Lib_风场信息Node11= this.Lib_风场信息Node11; var Lib_风场信息Node12= this.Lib_风场信息Node12; var Lib_风场信息Node13= this.Lib_风场信息Node13; var Lib_风场信息Node14= this.Lib_风场信息Node14; var Lib_风场信息Node15= this.Lib_风场信息Node15; if (type === 'click') { /*@EvnentClicked@*/ } else if (type === 'mousedown') { mouseX=e.clientX; mouseY=e.clientY; /*@EvnentMouseDown@*/ } else if (type === 'mouseup') { /*@EvnentMouseUp@*/ } else if (type === 'mousemove') { var mouseX, mouseY, position, zoom; position=origin.getLogicalPoint(e); zoom = graphView.getZoom(); if (origin === graphView) { mouseX= position.x + origin.tx(); mouseY = position.y + origin.ty(); } else { offset = offset || {x: 0, y: 0}; mouseX = position.x / zoom + offset.x + origin.tx(); mouseY = position.y / zoom + offset.y + origin.ty(); } /*@EvnentMouseLeave@*/ /*@EvnentMouseOver@*/ } else if (type === 'keydown') { /*@EvnentKeyDown@*/ } else if (type === 'contextmenu') { /*@Declare@*/ /*@SetNodeContextMenu@*/ /*@SetPageContextMenu@*/ } /*@LibEvent@*/ }, getBaseClass: function () { return this._baseClass; }, getWidth: function () { return this._width; }, getHeight: function () { return this._height; }, getSize: function () { return { width: this._width, height: this._height } }, setWidth: function (width) { if (width === undefined || width === null || width != width) { return ; } var originWidth = this._width; var ratio = width / originWidth; var childNodes = this.childNodes, childNode, p, op = this.getPosition(), w, cw, ox, rotation = this.getRotation(); for (var i = 0, len = childNodes.length; i < len; i++) { childNode = childNodes[i]; p = childNode.getPosition(); cw = childNode.getWidth(); w = cw >=2 ? cw * ratio : cw; childNode.setWidth(w); ox = op.x + (p.x - op.x) * ratio; childNode.setPosition(ox, p.y); rotation = GD.calcRotation(rotation); if (rotation === 0 || rotation === Math.PI) { // 图元未旋转 ox = op.x + (p.x - op.x)*ratio; childNode.setPosition(ox, p.y); } else if (rotation === 90 * Math.PI / 180) { // 图元旋转以后 ox = op.y + (p.y - op.y)*ratio; childNode.setPosition(p.x, ox); } } this._width = width; this._originWidth = width; this._ratioX = ratio; return this; }, setHeight: function (height) { if (height === undefined || height === null || height != height) { return ; } var originHeight = this._height; var ratio = height / originHeight; var childNodes = this.childNodes, childNode, p, op = this.getPosition(), h, ch, oy, rotation = this.getRotation(); for (var i = 0, len = childNodes.length; i < len; i++) { childNode = childNodes[i]; p = childNode.getPosition(); ch = childNode.getHeight(); h = ch >=2 ? ch * ratio : ch; childNode.setHeight(h); rotation = GD.calcRotation(rotation); if (rotation === 0 || rotation === Math.PI) { // 图元未旋转 oy = op.y + (p.y - op.y)*ratio; childNode.setPosition(p.x, oy); } else if (rotation === 90 * Math.PI / 180) { // 图元旋转以后 oy = op.x + (p.x - op.x)*ratio; childNode.setPosition(oy, p.y); } } this._height = height; this._originHeight = height; this._ratioY = ratio; return this; }, setSize: function (size) { // var args = Array.prototype.slice.call(arguments, 0); // var height, width; // if (args.length === 0) { // return ; // }else if (args.length === 1) { // height = args[0].height; // width = args[0].width; // } else { // width = args[0]; // height = args[1]; // } // var wh = GD.getRatioWithRotation(angle, wid) // this.setHeight(height); // this.setWidth(width); // return this; var args = Array.prototype.slice.call(arguments, 0); var height, width; if (args.length === 0) { return ; }else if (args.length === 1) { height = args[0].height; width = args[0].width; angle = 0; } else if (args.length === 2) { if (typeof args[0] === 'object') { width = args[0].width; height = args[0].height; angle = args[1] || 0; } else { width = args[0]; height = args[1]; angle = 0; } } else if (args.length === 3) { width = args[0]; height = args[1]; angle = args[2] || 0; } var wh = GD.getRatioWithRotation(0, width, height); this.setHeight(wh.ratioY); this.setWidth(wh.ratioX); return this; }, getPosition: function () { return { x: this._x, y: this._y } }, setPosition: function () { var args = Array.prototype.slice.call(arguments, 0), x, y; if (args.length === 0) { return this; } else if (args.length === 1) { if (typeof args[0] != 'object') { return this; } x = args[0].x; y = args[0].y; } else { x = args[0]; y = args[1]; } if ((x !== 0 && !x) || (y !== 0 && !y)) { return this; } // var childNodes = this.childNodes, offset, childNode, p; // for (var i = 0, len = childNodes.length; i < len; i++) { // childNode = childNodes[i]; // p = childNode.getPosition(); // childNode.setPosition(x - (this._x-p.x)*this._ratioX, y - (this._y-p.y)*this._ratioY); // } // this._x = x; // this._y = y; // return this; var childNodes, childNode, background, offset = {}, op, cp; childNodes = this.childNodes; background = this._background; op = background.getPosition(); offset.x = x - op.x; offset.y = y - op.y; for (var i = 0, len = childNodes.length; i < len; i++) { childNode = childNodes[i]; cp = childNode.getPosition(); childNode.setPosition(cp.x + offset.x, cp.y + offset.y); } this._x = x; this._y = y; this._position = {x: x, y: y}; return this; }, getStyle: function (key) { if (!key) { return undefined; } return this._styleObject[key]; }, setStyle: function (key, value, force) { var childNodes = this.childNodes, childNode; for (var i = 0, len = childNodes.length; i < len; i++) { childNode = childNodes[i]; if (key === '2d.visible') { if (value === graphView.isVisible(childNode)) { continue; } if (!value) { childNode._savedIsVisible = graphView.isVisible(childNode); childNode.s({ '2d.visible': false }) } else { childNode.s({ '2d.visible': childNode._savedIsVisible }) } continue; } childNode.s({ key: value }); } this._styleObject[key] = value; return this; }, calcSize: function () { var background = this._background; var position = background.getPosition(), width = background.getWidth(), height = background.getHeight(); this._width = width; this._height = height; this._x = position.x; this._y = position.y; this._position = { x: this._x, y: this._y } return this; return this; }, s: function (styleObj, force) { var args = Array.prototype.slice.call(arguments, 0); var styleObj; if (args.length === 0) { return this; } else if (args.length === 1) { styleObj = args[0]; } else { this.setStyle(args[0], args[1]); return this; } for (var key in styleObj) { if (!styleObj.hasOwnProperty(key)) { continue; } this.setStyle(key, styleObj[key], force); } return this; }, init: function (x, y, width, height, angle) { var that = this; this.calcSize(); (function (width, height, angle) { // that.setSize(width, height, angle); // var wh = GD.getRatioWithRotation(angle, width, height); // width = wh.ratioX; // height = wh.ratioY; var originHeight = that._height; var originWidth = that._width; var ratioY = height / originHeight; var ratioX = width / originWidth; var childNodes = that.childNodes, childNode,p, op = that.getPosition(), h, ch, oy, w, cw, ox, name, borderRatio, borderWidth; for (var i = 0, len = childNodes.length; i < len; i++) { childNode = childNodes[i]; p = childNode.getPosition(); childNode.originHeight = childNode.originHeight || childNode.getHeight(); ch = childNode.getHeight(); cw = childNode.getWidth(); if (ch > 2) { h = ch * ratioY; childNode.setHeight(h); } if (cw > 2) { w = cw * ratioX; childNode.setWidth(w); } borderRatio = (ratioX + ratioY)*0.5; if (childNode._nodeType === 'line') { // 如果是线, if (childNode.getWidth() > childNode.getHeight()) { borderRatio = ratioX; } else { borderRatio = ratioY; } } name = childNode._nodename; // if (childNode.borderWidth && name && ch > 2 && cw > 2) { // borderWidth = childNode.borderWidth / borderRatio; // if (borderWidth > ch*0.5 || borderWidth > cw *0.5) { // // borderWidth = childNode.borderWidth; // } // childNode.borderWidth = borderWidth; // childNode.a(name + '.borderwidth', borderWidth); // } } that._height = height; that._originHeight = height; that._ratioY = ratioY; that._width = width; that._originWidth = width; that._ratioX = ratioX; })(width, height, angle); that._x = width / 2; that._y = height / 2; that._rotation = 0; // that.setPosition(x, y); (function (x, y) { var childNodes = that.childNodes, offset, childNode; var w2 = that.getWidth() / 2, h2 = that.getHeight()/2; for (var i = 0, len = childNodes.length; i < len; i++) { childNode = childNodes[i]; offset = childNode.getPosition(); childNode.setPosition(x + offset.x * that._ratioX - w2, y + offset.y * that._ratioY - h2); } that._x = x; that._y = y; })(x, y); // setTimeout(that.addEVent, 1000); }, setRotation: function (angle) { var that = this, _angle = that.getRotation(); if (angle!==0 && !angle || angle === _angle) { return this; } var childNodes = this.childNodes, childNode, p = this.getPosition(), px = p.x, py = p.y; for (var i = 0, len = childNodes.length; i < len; i++) { childNode = childNodes[i]; var x = childNode.getPosition().x - px; var y = childNode.getPosition().y - py; childNode.setPosition(Math.cos(angle-_angle) * x - Math.sin(angle-_angle) * y + px, Math.cos(angle-_angle) * y + Math.sin(angle-_angle) * x + py); childNode.setRotation(angle); } this._rotation = angle; return this; }, getRotation: function () { return this._rotation; }, setScale: function (sx, sy) { var that = this, childNodes = this.childNodes, childNode; if (sx === undefined || sx === null) return ; if (sy === undefined || sy === null) { sy = sx; } for (var i = 0, len = childNodes.length; i < len; i++) { childNode = childNodes[i]; if (typeof childNode.setScale === 'function') { childNode.setScale(sx, sy); } } }, getScale: function () { return this._background.getScale(); }, setScaleX: function (sx) { if (sx === undefined || sx === null) return; var that = this, childNodes = this.childNodes, childNode; for (var i = 0, len = childNodes.length; i < len; i++) { childNode = childNodes[i]; if (typeof childNode.setScaleX === 'function') { childNode.setScaleX(sx); } } }, setScaleY: function (sy) { if (sy === undefined || sy === null) return; var that = this, childNodes = this.childNodes, childNode; for (var i = 0, len = childNodes.length; i < len; i++) { childNode = childNodes[i]; if (typeof childNode.setScaleY === 'function') { childNode.setScaleY(sy); } } }, getScaleX: function () { return this._background.getScaleX(); }, getScaleY: function () { return this._background.getScaleY(); }, evert: function () { var that = this, childNodes = this.childNodes, background = this._background, bp = background.getPosition(), bx = bp.x, by = bp.y, childNode, distanceX, distanceY, x, y, p, nx, ny; for (var i = 0, len = childNodes.length; i < len; i++) { childNode = childNodes[i]; p = childNode.getPosition(); x = p.x; y = p.y; distanceX = bx - x; distanceY = by - y; nx = bx + distanceX; ny = by + distanceY; childNode.setPosition(nx, ny); if (typeof childNode.setScale === 'function') { if (!(childNode._disallowEvert === true)) childNode.setScale(-1, -1); } } }, evertX: function () { var that = this, childNodes = this.childNodes, background = this._background, bx = background.getPosition().x, childNode, distance, x, p, nx; for (var i = 0, len = childNodes.length; i < len; i++) { childNode = childNodes[i]; p = childNode.getPosition(); x = p.x; distance = bx - x; nx = bx + distance; childNode.setPosition(nx, p.y); if (typeof childNode.setScaleX === 'function') { if (!(childNode._disallowEvert === true)) childNode.setScaleX(-1); } } }, evertY: function () { var that = this, childNodes = this.childNodes, background = this._background, by = background.getPosition().y, childNode, distance, y, p, ny; for (var i = 0, len = childNodes.length; i < len; i++) { childNode = childNodes[i]; p = childNode.getPosition(); y = p.y; distance = by - y; ny = by + distance; childNode.setPosition(p.x, ny); if (typeof childNode.setScaleY === 'function') { if (!(childNode._disallowEvert === true)) childNode.setScaleY(-1); } } }, attr: function (key, value) { var _attrObj = this._attrObj || {}; if (arguments.length === 1) { return _attrObj[key]; } var childNodes = this.childNodes, childNode; _attrObj[key] = value; for (var i = 0; childNode = childNodes[i++];) { if (typeof childNode.a === 'function') { childNode.a(key, value); } } }, a: function () { return this.attr.apply(this, arguments); } }); }