12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499 |
- 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 = 136*_ratio.ratioX;
- this._originHeight = 90*_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_0;
- (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//fjjz_red_n0.png', PAGEROOTDIR + 'image//fjjz_red_n0.png');
- Lib_叠加Node0_0 = new ht.Node();
- Lib_叠加Node0_0.setPosition(66*ratio.ratioX, 43*ratio.ratioY);
- Lib_叠加Node0_0.setSize(133*ratioX, 86*ratioY);
- Lib_叠加Node0_0.setImage('imgimage//fjjz_red_n0.png');
- Lib_叠加Node0_0.setRotation(0*Math.PI/180);
- Lib_叠加Node0_0._zoomBy = 'Default';
- Lib_叠加Node0_0._nodeType = 'image';
- Lib_叠加Node0_0._disallowEvert = true;
- dataModel.add(Lib_叠加Node0_0);
- })();
- var Lib_叠加Node0_1;
- (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//page_zmt_fj_red0.png', PAGEROOTDIR + 'image//page_zmt_fj_red0.png');
- Lib_叠加Node0_1 = new ht.Node();
- Lib_叠加Node0_1.setPosition(66*ratio.ratioX, 32*ratio.ratioY);
- Lib_叠加Node0_1.setSize(44*ratioX, 63*ratioY);
- Lib_叠加Node0_1.setImage('imgimage//page_zmt_fj_red0.png');
- Lib_叠加Node0_1.setRotation(0*Math.PI/180);
- Lib_叠加Node0_1._zoomBy = 'Default';
- Lib_叠加Node0_1._nodeType = 'image';
- Lib_叠加Node0_1._disallowEvert = true;
- dataModel.add(Lib_叠加Node0_1);
- })();
- var Lib_叠加Node1_0;
- (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//fjjz_orange_n0.png', PAGEROOTDIR + 'image//fjjz_orange_n0.png');
- Lib_叠加Node1_0 = new ht.Node();
- Lib_叠加Node1_0.setPosition(66*ratio.ratioX, 43*ratio.ratioY);
- Lib_叠加Node1_0.setSize(133*ratioX, 86*ratioY);
- Lib_叠加Node1_0.setImage('imgimage//fjjz_orange_n0.png');
- Lib_叠加Node1_0.setRotation(0*Math.PI/180);
- Lib_叠加Node1_0._zoomBy = 'Default';
- Lib_叠加Node1_0._nodeType = 'image';
- Lib_叠加Node1_0._disallowEvert = true;
- dataModel.add(Lib_叠加Node1_0);
- })();
- var Lib_叠加Node1_1;
- (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//page_zmt_fj_orange0.png', PAGEROOTDIR + 'image//page_zmt_fj_orange0.png');
- Lib_叠加Node1_1 = new ht.Node();
- Lib_叠加Node1_1.setPosition(66*ratio.ratioX, 32*ratio.ratioY);
- Lib_叠加Node1_1.setSize(44*ratioX, 63*ratioY);
- Lib_叠加Node1_1.setImage('imgimage//page_zmt_fj_orange0.png');
- Lib_叠加Node1_1.setRotation(0*Math.PI/180);
- Lib_叠加Node1_1._zoomBy = 'Default';
- Lib_叠加Node1_1._nodeType = 'image';
- Lib_叠加Node1_1._disallowEvert = true;
- dataModel.add(Lib_叠加Node1_1);
- })();
- var Lib_叠加Node2_0;
- (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//fjjz_green_n0.png', PAGEROOTDIR + 'image//fjjz_green_n0.png');
- Lib_叠加Node2_0 = new ht.Node();
- Lib_叠加Node2_0.setPosition(66*ratio.ratioX, 43*ratio.ratioY);
- Lib_叠加Node2_0.setSize(133*ratioX, 86*ratioY);
- Lib_叠加Node2_0.setImage('imgimage//fjjz_green_n0.png');
- Lib_叠加Node2_0.setRotation(0*Math.PI/180);
- Lib_叠加Node2_0._zoomBy = 'Default';
- Lib_叠加Node2_0._nodeType = 'image';
- Lib_叠加Node2_0._disallowEvert = true;
- dataModel.add(Lib_叠加Node2_0);
- })();
- var Lib_叠加Node2_1;
- (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//page_zmt_fj_green0.png', PAGEROOTDIR + 'image//page_zmt_fj_green0.png');
- Lib_叠加Node2_1 = new ht.Node();
- Lib_叠加Node2_1.setPosition(67*ratio.ratioX, 32*ratio.ratioY);
- Lib_叠加Node2_1.setSize(44*ratioX, 63*ratioY);
- Lib_叠加Node2_1.setImage('imgimage//page_zmt_fj_green0.png');
- Lib_叠加Node2_1.setRotation(0*Math.PI/180);
- Lib_叠加Node2_1._zoomBy = 'Default';
- Lib_叠加Node2_1._nodeType = 'image';
- Lib_叠加Node2_1._disallowEvert = true;
- dataModel.add(Lib_叠加Node2_1);
- })();
- var Lib_叠加Node3_0;
- (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//fjjz_pink_n0.png', PAGEROOTDIR + 'image//fjjz_pink_n0.png');
- Lib_叠加Node3_0 = new ht.Node();
- Lib_叠加Node3_0.setPosition(66*ratio.ratioX, 43*ratio.ratioY);
- Lib_叠加Node3_0.setSize(133*ratioX, 86*ratioY);
- Lib_叠加Node3_0.setImage('imgimage//fjjz_pink_n0.png');
- Lib_叠加Node3_0.setRotation(0*Math.PI/180);
- Lib_叠加Node3_0._zoomBy = 'Default';
- Lib_叠加Node3_0._nodeType = 'image';
- Lib_叠加Node3_0._disallowEvert = true;
- dataModel.add(Lib_叠加Node3_0);
- })();
- var Lib_叠加Node3_1;
- (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//page_zmt_fj_pink0.png', PAGEROOTDIR + 'image//page_zmt_fj_pink0.png');
- Lib_叠加Node3_1 = new ht.Node();
- Lib_叠加Node3_1.setPosition(66*ratio.ratioX, 32*ratio.ratioY);
- Lib_叠加Node3_1.setSize(44*ratioX, 63*ratioY);
- Lib_叠加Node3_1.setImage('imgimage//page_zmt_fj_pink0.png');
- Lib_叠加Node3_1.setRotation(0*Math.PI/180);
- Lib_叠加Node3_1._zoomBy = 'Default';
- Lib_叠加Node3_1._nodeType = 'image';
- Lib_叠加Node3_1._disallowEvert = true;
- dataModel.add(Lib_叠加Node3_1);
- })();
- var Lib_叠加Node4_0;
- (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//fjjz_black_n0.png', PAGEROOTDIR + 'image//fjjz_black_n0.png');
- Lib_叠加Node4_0 = new ht.Node();
- Lib_叠加Node4_0.setPosition(66*ratio.ratioX, 43*ratio.ratioY);
- Lib_叠加Node4_0.setSize(133*ratioX, 86*ratioY);
- Lib_叠加Node4_0.setImage('imgimage//fjjz_black_n0.png');
- Lib_叠加Node4_0.setRotation(0*Math.PI/180);
- Lib_叠加Node4_0._zoomBy = 'Default';
- Lib_叠加Node4_0._nodeType = 'image';
- Lib_叠加Node4_0._disallowEvert = true;
- dataModel.add(Lib_叠加Node4_0);
- })();
- var Lib_叠加Node4_1;
- (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//page_zmt_fj_gray0.png', PAGEROOTDIR + 'image//page_zmt_fj_gray0.png');
- Lib_叠加Node4_1 = new ht.Node();
- Lib_叠加Node4_1.setPosition(67*ratio.ratioX, 32*ratio.ratioY);
- Lib_叠加Node4_1.setSize(44*ratioX, 63*ratioY);
- Lib_叠加Node4_1.setImage('imgimage//page_zmt_fj_gray0.png');
- Lib_叠加Node4_1.setRotation(0*Math.PI/180);
- Lib_叠加Node4_1._zoomBy = 'Default';
- Lib_叠加Node4_1._nodeType = 'image';
- Lib_叠加Node4_1._disallowEvert = true;
- dataModel.add(Lib_叠加Node4_1);
- })();
- var Lib_叠加Node5_0;
- (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//fjjz_blue_n0.png', PAGEROOTDIR + 'image//fjjz_blue_n0.png');
- Lib_叠加Node5_0 = new ht.Node();
- Lib_叠加Node5_0.setPosition(66*ratio.ratioX, 45*ratio.ratioY);
- Lib_叠加Node5_0.setSize(133*ratioX, 86*ratioY);
- Lib_叠加Node5_0.setImage('imgimage//fjjz_blue_n0.png');
- Lib_叠加Node5_0.setRotation(0*Math.PI/180);
- Lib_叠加Node5_0._zoomBy = 'Default';
- Lib_叠加Node5_0._nodeType = 'image';
- Lib_叠加Node5_0._disallowEvert = true;
- dataModel.add(Lib_叠加Node5_0);
- })();
- var Lib_叠加Node5_1;
- (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//风机底座d0.png', PAGEROOTDIR + 'image//风机底座d0.png');
- Lib_叠加Node5_1 = new ht.Node();
- Lib_叠加Node5_1.setPosition(67*ratio.ratioX, 43*ratio.ratioY);
- Lib_叠加Node5_1.setSize(28*ratioX, 45*ratioY);
- Lib_叠加Node5_1.setImage('imgimage//风机底座d0.png');
- Lib_叠加Node5_1.setRotation(0*Math.PI/180);
- Lib_叠加Node5_1._zoomBy = 'Default';
- Lib_叠加Node5_1._nodeType = 'image';
- Lib_叠加Node5_1._disallowEvert = true;
- dataModel.add(Lib_叠加Node5_1);
- })();
- var Lib_叠加Node5_2;
- (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//风机叶片d0.png', PAGEROOTDIR + 'image//风机叶片d0.png');
- Lib_叠加Node5_2 = new ht.Node();
- Lib_叠加Node5_2.setPosition(67*ratio.ratioX, 28*ratio.ratioY);
- Lib_叠加Node5_2.setSize(56*ratioX, 56*ratioY);
- Lib_叠加Node5_2.setImage('imgimage//风机叶片d0.png');
- Lib_叠加Node5_2.setRotation(0*Math.PI/180);
- Lib_叠加Node5_2._zoomBy = 'Default';
- Lib_叠加Node5_2._nodeType = 'image';
- Lib_叠加Node5_2._disallowEvert = true;
- dataModel.add(Lib_叠加Node5_2);
- })();
- var Lib_叠加Node5_3;
- (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//风机头d0.png', PAGEROOTDIR + 'image//风机头d0.png');
- Lib_叠加Node5_3 = new ht.Node();
- Lib_叠加Node5_3.setPosition(66*ratio.ratioX, 28*ratio.ratioY);
- Lib_叠加Node5_3.setSize(9*ratioX, 7*ratioY);
- Lib_叠加Node5_3.setImage('imgimage//风机头d0.png');
- Lib_叠加Node5_3.setRotation(0*Math.PI/180);
- Lib_叠加Node5_3._zoomBy = 'Default';
- Lib_叠加Node5_3._nodeType = 'image';
- Lib_叠加Node5_3._disallowEvert = true;
- dataModel.add(Lib_叠加Node5_3);
- })();
- _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
- var Lib_叠加Node6_0 = new ht.Node();
- var Lib_叠加Node6_0textStart, Lib_叠加Node6_0textWidth, Lib_叠加Node6_0lineStart, Lib_叠加Node6_0align = 'left', Lib_叠加Node6_0fontSize = 15.99996*_ratio.ratioY,Lib_叠加Node6_0width = 50*_ratio.ratioX, Lib_叠加Node6_0height = 20*_ratio.ratioY;
- (function () {
- if (Lib_叠加Node6_0align === 'left') {
- Lib_叠加Node6_0textStart = Lib_叠加Node6_0fontSize * 0.2 > 2 ? Lib_叠加Node6_0fontSize * 0.2 - 4 : Lib_叠加Node6_0fontSize * 0.2 - 9;
- Lib_叠加Node6_0textWidth = Lib_叠加Node6_0width;
- Lib_叠加Node6_0lineStart = 1;
- } else if (Lib_叠加Node6_0align === 'right') {
- Lib_叠加Node6_0textStart = 0;
- Lib_叠加Node6_0textWidth =Lib_叠加Node6_0fontSize <= 8 ? Lib_叠加Node6_0width + Lib_叠加Node6_0fontSize * 0.2 + 6 : Lib_叠加Node6_0width - Lib_叠加Node6_0fontSize * 0.2;
- Lib_叠加Node6_0lineStart = (Lib_叠加Node6_0width - (ht.Default.getTextSize('A01', 'bold '+ Lib_叠加Node6_0fontSize + 'px "Arial"').width + 6)) * 0.5;
- } else if (Lib_叠加Node6_0align === 'center') {
- Lib_叠加Node6_0textStart = -3;
- Lib_叠加Node6_0textWidth = Lib_叠加Node6_0width;
- Lib_叠加Node6_0lineStart = Lib_叠加Node6_0width - ht.Default.getTextSize('A01', 'bold '+ Lib_叠加Node6_0fontSize + 'px "Arial"').width - 11;
- }
- })();
- Lib_叠加Node6_0.setImage(GD.getTextJSON(Lib_叠加Node6_0width, Lib_叠加Node6_0height, true, false, false, 'bold '+ Lib_叠加Node6_0fontSize + 'px "Arial"'))
- Lib_叠加Node6_0.setPosition(28*ratio.ratioX, 19*ratio.ratioY);
- Lib_叠加Node6_0.setWidth(Lib_叠加Node6_0width);
- Lib_叠加Node6_0.setHeight(Lib_叠加Node6_0height);
- Lib_叠加Node6_0._nodeType = 'text';
- Lib_叠加Node6_0._disallowEvert = true;
- Lib_叠加Node6_0.setRotation(0*Math.PI/180);
- Lib_叠加Node6_0.a('node.width', Lib_叠加Node6_0width);
- Lib_叠加Node6_0.a('node.height', Lib_叠加Node6_0height);
- Lib_叠加Node6_0.a('node.rect', [0, 0, Lib_叠加Node6_0width, Lib_叠加Node6_0height]);
- Lib_叠加Node6_0.a('node.bordercolor','rgba(0,0,0,1)');
- Lib_叠加Node6_0.a('node.borderwidth', 0);
- Lib_叠加Node6_0.a('node.background','' || 'rgba(0,0,0,0)');
- Lib_叠加Node6_0.a('node.gradient','');
- Lib_叠加Node6_0.a('node.gradientcolor','');
- Lib_叠加Node6_0.a('node.text','A01');
- Lib_叠加Node6_0.a('node.textalign','left');
- Lib_叠加Node6_0.a('node.textvAlign','middle');
- Lib_叠加Node6_0.a('node.textrect', [Lib_叠加Node6_0textStart, 0, Lib_叠加Node6_0textWidth, Lib_叠加Node6_0height]);
- Lib_叠加Node6_0.a('node.color','rgba(0,0,0,1)');
- Lib_叠加Node6_0.a('node.font','bold '+ Lib_叠加Node6_0fontSize + 'px "Arial"');
- Lib_叠加Node6_0.a('node.textvisible',true);
- Lib_叠加Node6_0.a('node.linefeed',false);
- if (false) {
- Lib_叠加Node6_0.a('node.textfunc',function(g) {
- g.beginPath();
- var str=Lib_叠加Node6_0.a('node.text') || 'A01';
- var color=Lib_叠加Node6_0.a('node.color') || 'rgba(0,0,0,1)';
- canvasTextAutoLine(str,0,15.99996*0.5*_ratio.ratioY,Lib_叠加Node6_0width,Lib_叠加Node6_0height,15.99996*_ratio.ratioY,"left",color,'bold '+ Lib_叠加Node6_0fontSize + 'px "Arial"', 0,g);
- });
- }
- if (false) {
- Lib_叠加Node6_0.a('node.underlinepoints',[Lib_叠加Node6_0lineStart, (20 - 15.99996) * 0.5 * _ratio.ratioY + Lib_叠加Node6_0fontSize + 2 , ht.Default.getTextSize('A01', 'bold '+ Lib_叠加Node6_0fontSize + 'px "Arial"').width + 6, (Lib_叠加Node6_0height - Lib_叠加Node6_0fontSize) * 0.5*_ratio.ratioY + Lib_叠加Node6_0fontSize + 2 ]);
- Lib_叠加Node6_0.a('node.underlinevisible',false);
- Lib_叠加Node6_0.a('node.underlineBorderWidth', 1);
- }
- dataModel.add(Lib_叠加Node6_0);
- zoomNodeList.push({
- node: Lib_叠加Node6_0,
- borderWidth: 0,
- attr: 'node.borderwidth'
- }); _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
- var Lib_叠加Node6_1 = new ht.Node();
- var Lib_叠加Node6_1textStart, Lib_叠加Node6_1textWidth, Lib_叠加Node6_1lineStart, Lib_叠加Node6_1align = 'left', Lib_叠加Node6_1fontSize = 11.99997*_ratio.ratioY,Lib_叠加Node6_1width = 52*_ratio.ratioX, Lib_叠加Node6_1height = 16*_ratio.ratioY;
- (function () {
- if (Lib_叠加Node6_1align === 'left') {
- Lib_叠加Node6_1textStart = Lib_叠加Node6_1fontSize * 0.2 > 2 ? Lib_叠加Node6_1fontSize * 0.2 - 4 : Lib_叠加Node6_1fontSize * 0.2 - 9;
- Lib_叠加Node6_1textWidth = Lib_叠加Node6_1width;
- Lib_叠加Node6_1lineStart = 1;
- } else if (Lib_叠加Node6_1align === 'right') {
- Lib_叠加Node6_1textStart = 0;
- Lib_叠加Node6_1textWidth =Lib_叠加Node6_1fontSize <= 8 ? Lib_叠加Node6_1width + Lib_叠加Node6_1fontSize * 0.2 + 6 : Lib_叠加Node6_1width - Lib_叠加Node6_1fontSize * 0.2;
- Lib_叠加Node6_1lineStart = (Lib_叠加Node6_1width - (ht.Default.getTextSize('风速m/s', ' '+ Lib_叠加Node6_1fontSize + 'px "Arial"').width + 6)) * 0.5;
- } else if (Lib_叠加Node6_1align === 'center') {
- Lib_叠加Node6_1textStart = -3;
- Lib_叠加Node6_1textWidth = Lib_叠加Node6_1width;
- Lib_叠加Node6_1lineStart = Lib_叠加Node6_1width - ht.Default.getTextSize('风速m/s', ' '+ Lib_叠加Node6_1fontSize + 'px "Arial"').width - 11;
- }
- })();
- Lib_叠加Node6_1.setImage(GD.getTextJSON(Lib_叠加Node6_1width, Lib_叠加Node6_1height, true, false, false, ' '+ Lib_叠加Node6_1fontSize + 'px "Arial"'))
- Lib_叠加Node6_1.setPosition(26*ratio.ratioX, 61*ratio.ratioY);
- Lib_叠加Node6_1.setWidth(Lib_叠加Node6_1width);
- Lib_叠加Node6_1.setHeight(Lib_叠加Node6_1height);
- Lib_叠加Node6_1._nodeType = 'text';
- Lib_叠加Node6_1._disallowEvert = true;
- Lib_叠加Node6_1.setRotation(0*Math.PI/180);
- Lib_叠加Node6_1.a('node.width', Lib_叠加Node6_1width);
- Lib_叠加Node6_1.a('node.height', Lib_叠加Node6_1height);
- Lib_叠加Node6_1.a('node.rect', [0, 0, Lib_叠加Node6_1width, Lib_叠加Node6_1height]);
- Lib_叠加Node6_1.a('node.bordercolor','rgba(0,0,0,1)');
- Lib_叠加Node6_1.a('node.borderwidth', 0);
- Lib_叠加Node6_1.a('node.background','' || 'rgba(0,0,0,0)');
- Lib_叠加Node6_1.a('node.gradient','');
- Lib_叠加Node6_1.a('node.gradientcolor','');
- Lib_叠加Node6_1.a('node.text','风速m/s');
- Lib_叠加Node6_1.a('node.textalign','left');
- Lib_叠加Node6_1.a('node.textvAlign','middle');
- Lib_叠加Node6_1.a('node.textrect', [Lib_叠加Node6_1textStart, 0, Lib_叠加Node6_1textWidth, Lib_叠加Node6_1height]);
- Lib_叠加Node6_1.a('node.color','rgba(0,0,0,1)');
- Lib_叠加Node6_1.a('node.font',' '+ Lib_叠加Node6_1fontSize + 'px "Arial"');
- Lib_叠加Node6_1.a('node.textvisible',true);
- Lib_叠加Node6_1.a('node.linefeed',false);
- if (false) {
- Lib_叠加Node6_1.a('node.textfunc',function(g) {
- g.beginPath();
- var str=Lib_叠加Node6_1.a('node.text') || '风速m/s';
- var color=Lib_叠加Node6_1.a('node.color') || 'rgba(0,0,0,1)';
- canvasTextAutoLine(str,0,11.99997*0.5*_ratio.ratioY,Lib_叠加Node6_1width,Lib_叠加Node6_1height,11.99997*_ratio.ratioY,"left",color,' '+ Lib_叠加Node6_1fontSize + 'px "Arial"', 0,g);
- });
- }
- if (false) {
- Lib_叠加Node6_1.a('node.underlinepoints',[Lib_叠加Node6_1lineStart, (16 - 11.99997) * 0.5 * _ratio.ratioY + Lib_叠加Node6_1fontSize + 2 , ht.Default.getTextSize('风速m/s', ' '+ Lib_叠加Node6_1fontSize + 'px "Arial"').width + 6, (Lib_叠加Node6_1height - Lib_叠加Node6_1fontSize) * 0.5*_ratio.ratioY + Lib_叠加Node6_1fontSize + 2 ]);
- Lib_叠加Node6_1.a('node.underlinevisible',false);
- Lib_叠加Node6_1.a('node.underlineBorderWidth', 1);
- }
- dataModel.add(Lib_叠加Node6_1);
- zoomNodeList.push({
- node: Lib_叠加Node6_1,
- borderWidth: 0,
- attr: 'node.borderwidth'
- }); _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
- var Lib_叠加Node6_2 = new ht.Node();
- var Lib_叠加Node6_2textStart, Lib_叠加Node6_2textWidth, Lib_叠加Node6_2lineStart, Lib_叠加Node6_2align = 'left', Lib_叠加Node6_2fontSize = 18.66662*_ratio.ratioY,Lib_叠加Node6_2width = 50*_ratio.ratioX, Lib_叠加Node6_2height = 21*_ratio.ratioY;
- (function () {
- if (Lib_叠加Node6_2align === 'left') {
- Lib_叠加Node6_2textStart = Lib_叠加Node6_2fontSize * 0.2 > 2 ? Lib_叠加Node6_2fontSize * 0.2 - 4 : Lib_叠加Node6_2fontSize * 0.2 - 9;
- Lib_叠加Node6_2textWidth = Lib_叠加Node6_2width;
- Lib_叠加Node6_2lineStart = 1;
- } else if (Lib_叠加Node6_2align === 'right') {
- Lib_叠加Node6_2textStart = 0;
- Lib_叠加Node6_2textWidth =Lib_叠加Node6_2fontSize <= 8 ? Lib_叠加Node6_2width + Lib_叠加Node6_2fontSize * 0.2 + 6 : Lib_叠加Node6_2width - Lib_叠加Node6_2fontSize * 0.2;
- Lib_叠加Node6_2lineStart = (Lib_叠加Node6_2width - (ht.Default.getTextSize('444', ' '+ Lib_叠加Node6_2fontSize + 'px "DS-Digital"').width + 6)) * 0.5;
- } else if (Lib_叠加Node6_2align === 'center') {
- Lib_叠加Node6_2textStart = -3;
- Lib_叠加Node6_2textWidth = Lib_叠加Node6_2width;
- Lib_叠加Node6_2lineStart = Lib_叠加Node6_2width - ht.Default.getTextSize('444', ' '+ Lib_叠加Node6_2fontSize + 'px "DS-Digital"').width - 11;
- }
- })();
- Lib_叠加Node6_2.setImage(GD.getTextJSON(Lib_叠加Node6_2width, Lib_叠加Node6_2height, true, false, false, ' '+ Lib_叠加Node6_2fontSize + 'px "DS-Digital"'))
- Lib_叠加Node6_2.setPosition(41*ratio.ratioX, 78*ratio.ratioY);
- Lib_叠加Node6_2.setWidth(Lib_叠加Node6_2width);
- Lib_叠加Node6_2.setHeight(Lib_叠加Node6_2height);
- Lib_叠加Node6_2._nodeType = 'text';
- Lib_叠加Node6_2._disallowEvert = true;
- Lib_叠加Node6_2.setRotation(0*Math.PI/180);
- Lib_叠加Node6_2.a('node.width', Lib_叠加Node6_2width);
- Lib_叠加Node6_2.a('node.height', Lib_叠加Node6_2height);
- Lib_叠加Node6_2.a('node.rect', [0, 0, Lib_叠加Node6_2width, Lib_叠加Node6_2height]);
- Lib_叠加Node6_2.a('node.bordercolor','rgba(0,0,0,1)');
- Lib_叠加Node6_2.a('node.borderwidth', 0);
- Lib_叠加Node6_2.a('node.background','' || 'rgba(0,0,0,0)');
- Lib_叠加Node6_2.a('node.gradient','');
- Lib_叠加Node6_2.a('node.gradientcolor','');
- Lib_叠加Node6_2.a('node.text','444');
- Lib_叠加Node6_2.a('node.textalign','left');
- Lib_叠加Node6_2.a('node.textvAlign','middle');
- Lib_叠加Node6_2.a('node.textrect', [Lib_叠加Node6_2textStart, 0, Lib_叠加Node6_2textWidth, Lib_叠加Node6_2height]);
- Lib_叠加Node6_2.a('node.color','rgba(0,0,0,1)');
- Lib_叠加Node6_2.a('node.font',' '+ Lib_叠加Node6_2fontSize + 'px "DS-Digital"');
- Lib_叠加Node6_2.a('node.textvisible',true);
- Lib_叠加Node6_2.a('node.linefeed',false);
- if (false) {
- Lib_叠加Node6_2.a('node.textfunc',function(g) {
- g.beginPath();
- var str=Lib_叠加Node6_2.a('node.text') || '444';
- var color=Lib_叠加Node6_2.a('node.color') || 'rgba(0,0,0,1)';
- canvasTextAutoLine(str,0,18.66662*0.5*_ratio.ratioY,Lib_叠加Node6_2width,Lib_叠加Node6_2height,18.66662*_ratio.ratioY,"left",color,' '+ Lib_叠加Node6_2fontSize + 'px "DS-Digital"', 0,g);
- });
- }
- if (false) {
- Lib_叠加Node6_2.a('node.underlinepoints',[Lib_叠加Node6_2lineStart, (21 - 18.66662) * 0.5 * _ratio.ratioY + Lib_叠加Node6_2fontSize + 2 , ht.Default.getTextSize('444', ' '+ Lib_叠加Node6_2fontSize + 'px "DS-Digital"').width + 6, (Lib_叠加Node6_2height - Lib_叠加Node6_2fontSize) * 0.5*_ratio.ratioY + Lib_叠加Node6_2fontSize + 2 ]);
- Lib_叠加Node6_2.a('node.underlinevisible',false);
- Lib_叠加Node6_2.a('node.underlineBorderWidth', 1);
- }
- dataModel.add(Lib_叠加Node6_2);
- zoomNodeList.push({
- node: Lib_叠加Node6_2,
- borderWidth: 0,
- attr: 'node.borderwidth'
- }); _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
- var Lib_叠加Node6_3 = new ht.Node();
- var Lib_叠加Node6_3textStart, Lib_叠加Node6_3textWidth, Lib_叠加Node6_3lineStart, Lib_叠加Node6_3align = 'left', Lib_叠加Node6_3fontSize = 11.99997*_ratio.ratioY,Lib_叠加Node6_3width = 52*_ratio.ratioX, Lib_叠加Node6_3height = 16*_ratio.ratioY;
- (function () {
- if (Lib_叠加Node6_3align === 'left') {
- Lib_叠加Node6_3textStart = Lib_叠加Node6_3fontSize * 0.2 > 2 ? Lib_叠加Node6_3fontSize * 0.2 - 4 : Lib_叠加Node6_3fontSize * 0.2 - 9;
- Lib_叠加Node6_3textWidth = Lib_叠加Node6_3width;
- Lib_叠加Node6_3lineStart = 1;
- } else if (Lib_叠加Node6_3align === 'right') {
- Lib_叠加Node6_3textStart = 0;
- Lib_叠加Node6_3textWidth =Lib_叠加Node6_3fontSize <= 8 ? Lib_叠加Node6_3width + Lib_叠加Node6_3fontSize * 0.2 + 6 : Lib_叠加Node6_3width - Lib_叠加Node6_3fontSize * 0.2;
- Lib_叠加Node6_3lineStart = (Lib_叠加Node6_3width - (ht.Default.getTextSize('功率Kw', ' '+ Lib_叠加Node6_3fontSize + 'px "Arial"').width + 6)) * 0.5;
- } else if (Lib_叠加Node6_3align === 'center') {
- Lib_叠加Node6_3textStart = -3;
- Lib_叠加Node6_3textWidth = Lib_叠加Node6_3width;
- Lib_叠加Node6_3lineStart = Lib_叠加Node6_3width - ht.Default.getTextSize('功率Kw', ' '+ Lib_叠加Node6_3fontSize + 'px "Arial"').width - 11;
- }
- })();
- Lib_叠加Node6_3.setImage(GD.getTextJSON(Lib_叠加Node6_3width, Lib_叠加Node6_3height, true, false, false, ' '+ Lib_叠加Node6_3fontSize + 'px "Arial"'))
- Lib_叠加Node6_3.setPosition(110*ratio.ratioX, 61*ratio.ratioY);
- Lib_叠加Node6_3.setWidth(Lib_叠加Node6_3width);
- Lib_叠加Node6_3.setHeight(Lib_叠加Node6_3height);
- Lib_叠加Node6_3._nodeType = 'text';
- Lib_叠加Node6_3._disallowEvert = true;
- Lib_叠加Node6_3.setRotation(0*Math.PI/180);
- Lib_叠加Node6_3.a('node.width', Lib_叠加Node6_3width);
- Lib_叠加Node6_3.a('node.height', Lib_叠加Node6_3height);
- Lib_叠加Node6_3.a('node.rect', [0, 0, Lib_叠加Node6_3width, Lib_叠加Node6_3height]);
- Lib_叠加Node6_3.a('node.bordercolor','rgba(0,0,0,1)');
- Lib_叠加Node6_3.a('node.borderwidth', 0);
- Lib_叠加Node6_3.a('node.background','' || 'rgba(0,0,0,0)');
- Lib_叠加Node6_3.a('node.gradient','');
- Lib_叠加Node6_3.a('node.gradientcolor','');
- Lib_叠加Node6_3.a('node.text','功率Kw');
- Lib_叠加Node6_3.a('node.textalign','left');
- Lib_叠加Node6_3.a('node.textvAlign','middle');
- Lib_叠加Node6_3.a('node.textrect', [Lib_叠加Node6_3textStart, 0, Lib_叠加Node6_3textWidth, Lib_叠加Node6_3height]);
- Lib_叠加Node6_3.a('node.color','rgba(0,0,0,1)');
- Lib_叠加Node6_3.a('node.font',' '+ Lib_叠加Node6_3fontSize + 'px "Arial"');
- Lib_叠加Node6_3.a('node.textvisible',true);
- Lib_叠加Node6_3.a('node.linefeed',false);
- if (false) {
- Lib_叠加Node6_3.a('node.textfunc',function(g) {
- g.beginPath();
- var str=Lib_叠加Node6_3.a('node.text') || '功率Kw';
- var color=Lib_叠加Node6_3.a('node.color') || 'rgba(0,0,0,1)';
- canvasTextAutoLine(str,0,11.99997*0.5*_ratio.ratioY,Lib_叠加Node6_3width,Lib_叠加Node6_3height,11.99997*_ratio.ratioY,"left",color,' '+ Lib_叠加Node6_3fontSize + 'px "Arial"', 0,g);
- });
- }
- if (false) {
- Lib_叠加Node6_3.a('node.underlinepoints',[Lib_叠加Node6_3lineStart, (16 - 11.99997) * 0.5 * _ratio.ratioY + Lib_叠加Node6_3fontSize + 2 , ht.Default.getTextSize('功率Kw', ' '+ Lib_叠加Node6_3fontSize + 'px "Arial"').width + 6, (Lib_叠加Node6_3height - Lib_叠加Node6_3fontSize) * 0.5*_ratio.ratioY + Lib_叠加Node6_3fontSize + 2 ]);
- Lib_叠加Node6_3.a('node.underlinevisible',false);
- Lib_叠加Node6_3.a('node.underlineBorderWidth', 1);
- }
- dataModel.add(Lib_叠加Node6_3);
- zoomNodeList.push({
- node: Lib_叠加Node6_3,
- borderWidth: 0,
- attr: 'node.borderwidth'
- }); _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
- var Lib_叠加Node6_4 = new ht.Node();
- var Lib_叠加Node6_4textStart, Lib_叠加Node6_4textWidth, Lib_叠加Node6_4lineStart, Lib_叠加Node6_4align = 'center', Lib_叠加Node6_4fontSize = 18.66662*_ratio.ratioY,Lib_叠加Node6_4width = 50*_ratio.ratioX, Lib_叠加Node6_4height = 21*_ratio.ratioY;
- (function () {
- if (Lib_叠加Node6_4align === 'left') {
- Lib_叠加Node6_4textStart = Lib_叠加Node6_4fontSize * 0.2 > 2 ? Lib_叠加Node6_4fontSize * 0.2 - 4 : Lib_叠加Node6_4fontSize * 0.2 - 9;
- Lib_叠加Node6_4textWidth = Lib_叠加Node6_4width;
- Lib_叠加Node6_4lineStart = 1;
- } else if (Lib_叠加Node6_4align === 'right') {
- Lib_叠加Node6_4textStart = 0;
- Lib_叠加Node6_4textWidth =Lib_叠加Node6_4fontSize <= 8 ? Lib_叠加Node6_4width + Lib_叠加Node6_4fontSize * 0.2 + 6 : Lib_叠加Node6_4width - Lib_叠加Node6_4fontSize * 0.2;
- Lib_叠加Node6_4lineStart = (Lib_叠加Node6_4width - (ht.Default.getTextSize('444', ' '+ Lib_叠加Node6_4fontSize + 'px "DS-Digital"').width + 6)) * 0.5;
- } else if (Lib_叠加Node6_4align === 'center') {
- Lib_叠加Node6_4textStart = -3;
- Lib_叠加Node6_4textWidth = Lib_叠加Node6_4width;
- Lib_叠加Node6_4lineStart = Lib_叠加Node6_4width - ht.Default.getTextSize('444', ' '+ Lib_叠加Node6_4fontSize + 'px "DS-Digital"').width - 11;
- }
- })();
- Lib_叠加Node6_4.setImage(GD.getTextJSON(Lib_叠加Node6_4width, Lib_叠加Node6_4height, true, false, false, ' '+ Lib_叠加Node6_4fontSize + 'px "DS-Digital"'))
- Lib_叠加Node6_4.setPosition(102*ratio.ratioX, 79*ratio.ratioY);
- Lib_叠加Node6_4.setWidth(Lib_叠加Node6_4width);
- Lib_叠加Node6_4.setHeight(Lib_叠加Node6_4height);
- Lib_叠加Node6_4._nodeType = 'text';
- Lib_叠加Node6_4._disallowEvert = true;
- Lib_叠加Node6_4.setRotation(0*Math.PI/180);
- Lib_叠加Node6_4.a('node.width', Lib_叠加Node6_4width);
- Lib_叠加Node6_4.a('node.height', Lib_叠加Node6_4height);
- Lib_叠加Node6_4.a('node.rect', [0, 0, Lib_叠加Node6_4width, Lib_叠加Node6_4height]);
- Lib_叠加Node6_4.a('node.bordercolor','rgba(0,0,0,1)');
- Lib_叠加Node6_4.a('node.borderwidth', 0);
- Lib_叠加Node6_4.a('node.background','' || 'rgba(0,0,0,0)');
- Lib_叠加Node6_4.a('node.gradient','');
- Lib_叠加Node6_4.a('node.gradientcolor','');
- Lib_叠加Node6_4.a('node.text','444');
- Lib_叠加Node6_4.a('node.textalign','center');
- Lib_叠加Node6_4.a('node.textvAlign','middle');
- Lib_叠加Node6_4.a('node.textrect', [Lib_叠加Node6_4textStart, 0, Lib_叠加Node6_4textWidth, Lib_叠加Node6_4height]);
- Lib_叠加Node6_4.a('node.color','rgba(0,0,0,1)');
- Lib_叠加Node6_4.a('node.font',' '+ Lib_叠加Node6_4fontSize + 'px "DS-Digital"');
- Lib_叠加Node6_4.a('node.textvisible',true);
- Lib_叠加Node6_4.a('node.linefeed',false);
- if (false) {
- Lib_叠加Node6_4.a('node.textfunc',function(g) {
- g.beginPath();
- var str=Lib_叠加Node6_4.a('node.text') || '444';
- var color=Lib_叠加Node6_4.a('node.color') || 'rgba(0,0,0,1)';
- canvasTextAutoLine(str,0,18.66662*0.5*_ratio.ratioY,Lib_叠加Node6_4width,Lib_叠加Node6_4height,18.66662*_ratio.ratioY,"center",color,' '+ Lib_叠加Node6_4fontSize + 'px "DS-Digital"', 0,g);
- });
- }
- if (false) {
- Lib_叠加Node6_4.a('node.underlinepoints',[Lib_叠加Node6_4lineStart, (21 - 18.66662) * 0.5 * _ratio.ratioY + Lib_叠加Node6_4fontSize + 2 , ht.Default.getTextSize('444', ' '+ Lib_叠加Node6_4fontSize + 'px "DS-Digital"').width + 6, (Lib_叠加Node6_4height - Lib_叠加Node6_4fontSize) * 0.5*_ratio.ratioY + Lib_叠加Node6_4fontSize + 2 ]);
- Lib_叠加Node6_4.a('node.underlinevisible',false);
- Lib_叠加Node6_4.a('node.underlineBorderWidth', 1);
- }
- dataModel.add(Lib_叠加Node6_4);
- zoomNodeList.push({
- node: Lib_叠加Node6_4,
- borderWidth: 0,
- attr: 'node.borderwidth'
- });
- /*@GraphList@*/
- /*@PageInit@*/
-
- var localVarObj = this.localVarObj;
- var localDynamicVarObj = this.localDynamicVar();
- var zhuangtai= localVarObj.zhuangtai || localDynamicVarObj.zhuangtai;
- var bianhao= localVarObj.bianhao || localDynamicVarObj.bianhao;
- var fengsu= localVarObj.fengsu || localDynamicVarObj.fengsu;
- var gonglv= localVarObj.gonglv || localDynamicVarObj.gonglv;
- this['Lib_叠加Node0_0'] = Lib_叠加Node0_0;
- Lib_叠加Node0_0.__parentLib = nodename;
- Lib_叠加Node0_0.__parent = this;
- this.childNodes.push(Lib_叠加Node0_0);
- this['Lib_叠加Node0_1'] = Lib_叠加Node0_1;
- Lib_叠加Node0_1.__parentLib = nodename;
- Lib_叠加Node0_1.__parent = this;
- this.childNodes.push(Lib_叠加Node0_1);
- this['Lib_叠加Node1_0'] = Lib_叠加Node1_0;
- Lib_叠加Node1_0.__parentLib = nodename;
- Lib_叠加Node1_0.__parent = this;
- this.childNodes.push(Lib_叠加Node1_0);
- this['Lib_叠加Node1_1'] = Lib_叠加Node1_1;
- Lib_叠加Node1_1.__parentLib = nodename;
- Lib_叠加Node1_1.__parent = this;
- this.childNodes.push(Lib_叠加Node1_1);
- this['Lib_叠加Node2_0'] = Lib_叠加Node2_0;
- Lib_叠加Node2_0.__parentLib = nodename;
- Lib_叠加Node2_0.__parent = this;
- this.childNodes.push(Lib_叠加Node2_0);
- this['Lib_叠加Node2_1'] = Lib_叠加Node2_1;
- Lib_叠加Node2_1.__parentLib = nodename;
- Lib_叠加Node2_1.__parent = this;
- this.childNodes.push(Lib_叠加Node2_1);
- this['Lib_叠加Node3_0'] = Lib_叠加Node3_0;
- Lib_叠加Node3_0.__parentLib = nodename;
- Lib_叠加Node3_0.__parent = this;
- this.childNodes.push(Lib_叠加Node3_0);
- this['Lib_叠加Node3_1'] = Lib_叠加Node3_1;
- Lib_叠加Node3_1.__parentLib = nodename;
- Lib_叠加Node3_1.__parent = this;
- this.childNodes.push(Lib_叠加Node3_1);
- this['Lib_叠加Node4_0'] = Lib_叠加Node4_0;
- Lib_叠加Node4_0.__parentLib = nodename;
- Lib_叠加Node4_0.__parent = this;
- this.childNodes.push(Lib_叠加Node4_0);
- this['Lib_叠加Node4_1'] = Lib_叠加Node4_1;
- Lib_叠加Node4_1.__parentLib = nodename;
- Lib_叠加Node4_1.__parent = this;
- this.childNodes.push(Lib_叠加Node4_1);
- this['Lib_叠加Node5_0'] = Lib_叠加Node5_0;
- Lib_叠加Node5_0.__parentLib = nodename;
- Lib_叠加Node5_0.__parent = this;
- this.childNodes.push(Lib_叠加Node5_0);
- this['Lib_叠加Node5_1'] = Lib_叠加Node5_1;
- Lib_叠加Node5_1.__parentLib = nodename;
- Lib_叠加Node5_1.__parent = this;
- this.childNodes.push(Lib_叠加Node5_1);
- this['Lib_叠加Node5_2'] = Lib_叠加Node5_2;
- Lib_叠加Node5_2.__parentLib = nodename;
- Lib_叠加Node5_2.__parent = this;
- this.childNodes.push(Lib_叠加Node5_2);
- this['Lib_叠加Node5_3'] = Lib_叠加Node5_3;
- Lib_叠加Node5_3.__parentLib = nodename;
- Lib_叠加Node5_3.__parent = this;
- this.childNodes.push(Lib_叠加Node5_3);
- this['Lib_叠加Node6_0'] = Lib_叠加Node6_0;
- Lib_叠加Node6_0.__parentLib = nodename;
- Lib_叠加Node6_0.__parent = this;
- this.childNodes.push(Lib_叠加Node6_0);
- this['Lib_叠加Node6_1'] = Lib_叠加Node6_1;
- Lib_叠加Node6_1.__parentLib = nodename;
- Lib_叠加Node6_1.__parent = this;
- this.childNodes.push(Lib_叠加Node6_1);
- this['Lib_叠加Node6_2'] = Lib_叠加Node6_2;
- Lib_叠加Node6_2.__parentLib = nodename;
- Lib_叠加Node6_2.__parent = this;
- this.childNodes.push(Lib_叠加Node6_2);
- this['Lib_叠加Node6_3'] = Lib_叠加Node6_3;
- Lib_叠加Node6_3.__parentLib = nodename;
- Lib_叠加Node6_3.__parent = this;
- this.childNodes.push(Lib_叠加Node6_3);
- this['Lib_叠加Node6_4'] = Lib_叠加Node6_4;
- Lib_叠加Node6_4.__parentLib = nodename;
- Lib_叠加Node6_4.__parent = this;
- this.childNodes.push(Lib_叠加Node6_4);
- /*@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 zhuangtai= localVarObj.zhuangtai || localDynamicVarObj.zhuangtai;
- var bianhao= localVarObj.bianhao || localDynamicVarObj.bianhao;
- var fengsu= localVarObj.fengsu || localDynamicVarObj.fengsu;
- var gonglv= localVarObj.gonglv || localDynamicVarObj.gonglv;
- var Lib_叠加Node0_0= this.Lib_叠加Node0_0;
- var Lib_叠加Node0_1= this.Lib_叠加Node0_1;
- var Lib_叠加Node1_0= this.Lib_叠加Node1_0;
- var Lib_叠加Node1_1= this.Lib_叠加Node1_1;
- var Lib_叠加Node2_0= this.Lib_叠加Node2_0;
- var Lib_叠加Node2_1= this.Lib_叠加Node2_1;
- var Lib_叠加Node3_0= this.Lib_叠加Node3_0;
- var Lib_叠加Node3_1= this.Lib_叠加Node3_1;
- var Lib_叠加Node4_0= this.Lib_叠加Node4_0;
- var Lib_叠加Node4_1= this.Lib_叠加Node4_1;
- var Lib_叠加Node5_0= this.Lib_叠加Node5_0;
- var Lib_叠加Node5_1= this.Lib_叠加Node5_1;
- var Lib_叠加Node5_2= this.Lib_叠加Node5_2;
- var Lib_叠加Node5_3= this.Lib_叠加Node5_3;
- var Lib_叠加Node6_0= this.Lib_叠加Node6_0;
- var Lib_叠加Node6_1= this.Lib_叠加Node6_1;
- var Lib_叠加Node6_2= this.Lib_叠加Node6_2;
- var Lib_叠加Node6_3= this.Lib_叠加Node6_3;
- var Lib_叠加Node6_4= this.Lib_叠加Node6_4;
- /*@refresh10ms@*/
- },
- refresh100ms: function () {
-
- var localVarObj = this.localVarObj;
- var localDynamicVarObj = this.localDynamicVar();
- var zhuangtai= localVarObj.zhuangtai || localDynamicVarObj.zhuangtai;
- var bianhao= localVarObj.bianhao || localDynamicVarObj.bianhao;
- var fengsu= localVarObj.fengsu || localDynamicVarObj.fengsu;
- var gonglv= localVarObj.gonglv || localDynamicVarObj.gonglv;
- var Lib_叠加Node0_0= this.Lib_叠加Node0_0;
- var Lib_叠加Node0_1= this.Lib_叠加Node0_1;
- var Lib_叠加Node1_0= this.Lib_叠加Node1_0;
- var Lib_叠加Node1_1= this.Lib_叠加Node1_1;
- var Lib_叠加Node2_0= this.Lib_叠加Node2_0;
- var Lib_叠加Node2_1= this.Lib_叠加Node2_1;
- var Lib_叠加Node3_0= this.Lib_叠加Node3_0;
- var Lib_叠加Node3_1= this.Lib_叠加Node3_1;
- var Lib_叠加Node4_0= this.Lib_叠加Node4_0;
- var Lib_叠加Node4_1= this.Lib_叠加Node4_1;
- var Lib_叠加Node5_0= this.Lib_叠加Node5_0;
- var Lib_叠加Node5_1= this.Lib_叠加Node5_1;
- var Lib_叠加Node5_2= this.Lib_叠加Node5_2;
- var Lib_叠加Node5_3= this.Lib_叠加Node5_3;
- var Lib_叠加Node6_0= this.Lib_叠加Node6_0;
- var Lib_叠加Node6_1= this.Lib_叠加Node6_1;
- var Lib_叠加Node6_2= this.Lib_叠加Node6_2;
- var Lib_叠加Node6_3= this.Lib_叠加Node6_3;
- var Lib_叠加Node6_4= this.Lib_叠加Node6_4;
- Lib_叠加Node5_2.setRotation(((30) )*Math.PI/180+Lib_叠加Node5_2.getRotation());
- Lib_叠加Node6_0.a('node.text',''+bianhao+'');
- Lib_叠加Node6_2.a('node.text',GetDital((getVarValue(fengsu) ),-1));
- Lib_叠加Node6_4.a('node.text',GetDital((getVarValue(gonglv) ),-1));
- /*@refresh100ms@*/
- },
- refresh500ms: function () {
-
- var localVarObj = this.localVarObj;
- var localDynamicVarObj = this.localDynamicVar();
- var zhuangtai= localVarObj.zhuangtai || localDynamicVarObj.zhuangtai;
- var bianhao= localVarObj.bianhao || localDynamicVarObj.bianhao;
- var fengsu= localVarObj.fengsu || localDynamicVarObj.fengsu;
- var gonglv= localVarObj.gonglv || localDynamicVarObj.gonglv;
- var Lib_叠加Node0_0= this.Lib_叠加Node0_0;
- var Lib_叠加Node0_1= this.Lib_叠加Node0_1;
- var Lib_叠加Node1_0= this.Lib_叠加Node1_0;
- var Lib_叠加Node1_1= this.Lib_叠加Node1_1;
- var Lib_叠加Node2_0= this.Lib_叠加Node2_0;
- var Lib_叠加Node2_1= this.Lib_叠加Node2_1;
- var Lib_叠加Node3_0= this.Lib_叠加Node3_0;
- var Lib_叠加Node3_1= this.Lib_叠加Node3_1;
- var Lib_叠加Node4_0= this.Lib_叠加Node4_0;
- var Lib_叠加Node4_1= this.Lib_叠加Node4_1;
- var Lib_叠加Node5_0= this.Lib_叠加Node5_0;
- var Lib_叠加Node5_1= this.Lib_叠加Node5_1;
- var Lib_叠加Node5_2= this.Lib_叠加Node5_2;
- var Lib_叠加Node5_3= this.Lib_叠加Node5_3;
- var Lib_叠加Node6_0= this.Lib_叠加Node6_0;
- var Lib_叠加Node6_1= this.Lib_叠加Node6_1;
- var Lib_叠加Node6_2= this.Lib_叠加Node6_2;
- var Lib_叠加Node6_3= this.Lib_叠加Node6_3;
- var Lib_叠加Node6_4= this.Lib_叠加Node6_4;
- if((1 )>0) {if(((getVarValue(zhuangtai)==2)>0 )){Lib_叠加Node0_0.s('2d.visible',true&&this.getStyle('2d.visible'));}else{Lib_叠加Node0_0.s('2d.visible',false&&this.getStyle('2d.visible'));}}
- if((1 )>0) {if(((getVarValue(zhuangtai)==2)>0 )){Lib_叠加Node0_1.s('2d.visible',true&&this.getStyle('2d.visible'));}else{Lib_叠加Node0_1.s('2d.visible',false&&this.getStyle('2d.visible'));}}
- if((1 )>0) {if(((getVarValue(zhuangtai)==4)>0 )){Lib_叠加Node1_0.s('2d.visible',true&&this.getStyle('2d.visible'));}else{Lib_叠加Node1_0.s('2d.visible',false&&this.getStyle('2d.visible'));}}
- if((1 )>0) {if(((getVarValue(zhuangtai)==4)>0 )){Lib_叠加Node1_1.s('2d.visible',true&&this.getStyle('2d.visible'));}else{Lib_叠加Node1_1.s('2d.visible',false&&this.getStyle('2d.visible'));}}
- if((1 )>0) {if(((getVarValue(zhuangtai)==0)>0 )){Lib_叠加Node2_0.s('2d.visible',true&&this.getStyle('2d.visible'));}else{Lib_叠加Node2_0.s('2d.visible',false&&this.getStyle('2d.visible'));}}
- if((1 )>0) {if(((getVarValue(zhuangtai)==0)>0 )){Lib_叠加Node2_1.s('2d.visible',true&&this.getStyle('2d.visible'));}else{Lib_叠加Node2_1.s('2d.visible',false&&this.getStyle('2d.visible'));}}
- if((1 )>0) {if(((getVarValue(zhuangtai)==5||getVarValue(zhuangtai)==6)>0 )){Lib_叠加Node3_0.s('2d.visible',true&&this.getStyle('2d.visible'));}else{Lib_叠加Node3_0.s('2d.visible',false&&this.getStyle('2d.visible'));}}
- if((1 )>0) {if(((getVarValue(zhuangtai)==5||getVarValue(zhuangtai)==6)>0 )){Lib_叠加Node3_1.s('2d.visible',true&&this.getStyle('2d.visible'));}else{Lib_叠加Node3_1.s('2d.visible',false&&this.getStyle('2d.visible'));}}
- if((1 )>0) {if(((getVarValue(zhuangtai)==3)>0 )){Lib_叠加Node4_0.s('2d.visible',true&&this.getStyle('2d.visible'));}else{Lib_叠加Node4_0.s('2d.visible',false&&this.getStyle('2d.visible'));}}
- if((1 )>0) {if(((getVarValue(zhuangtai)==3)>0 )){Lib_叠加Node4_1.s('2d.visible',true&&this.getStyle('2d.visible'));}else{Lib_叠加Node4_1.s('2d.visible',false&&this.getStyle('2d.visible'));}}
- if((1 )>0) {if(((getVarValue(zhuangtai)==1)>0 )){Lib_叠加Node5_0.s('2d.visible',true&&this.getStyle('2d.visible'));}else{Lib_叠加Node5_0.s('2d.visible',false&&this.getStyle('2d.visible'));}}
- if((1 )>0) {if(((getVarValue(zhuangtai)==1)>0 )){Lib_叠加Node5_1.s('2d.visible',true&&this.getStyle('2d.visible'));}else{Lib_叠加Node5_1.s('2d.visible',false&&this.getStyle('2d.visible'));}}
- if((1 )>0) {if(((getVarValue(zhuangtai)==1)>0 )){Lib_叠加Node5_2.s('2d.visible',true&&this.getStyle('2d.visible'));}else{Lib_叠加Node5_2.s('2d.visible',false&&this.getStyle('2d.visible'));}}
- if((1 )>0) {if(((getVarValue(zhuangtai)==1)>0 )){Lib_叠加Node5_3.s('2d.visible',true&&this.getStyle('2d.visible'));}else{Lib_叠加Node5_3.s('2d.visible',false&&this.getStyle('2d.visible'));}}
- /*@refresh500ms@*/
- },
- refresh1s: function () {
- var Counter1s = arguments[0] || 0;
-
- var localVarObj = this.localVarObj;
- var localDynamicVarObj = this.localDynamicVar();
- var zhuangtai= localVarObj.zhuangtai || localDynamicVarObj.zhuangtai;
- var bianhao= localVarObj.bianhao || localDynamicVarObj.bianhao;
- var fengsu= localVarObj.fengsu || localDynamicVarObj.fengsu;
- var gonglv= localVarObj.gonglv || localDynamicVarObj.gonglv;
- var Lib_叠加Node0_0= this.Lib_叠加Node0_0;
- var Lib_叠加Node0_1= this.Lib_叠加Node0_1;
- var Lib_叠加Node1_0= this.Lib_叠加Node1_0;
- var Lib_叠加Node1_1= this.Lib_叠加Node1_1;
- var Lib_叠加Node2_0= this.Lib_叠加Node2_0;
- var Lib_叠加Node2_1= this.Lib_叠加Node2_1;
- var Lib_叠加Node3_0= this.Lib_叠加Node3_0;
- var Lib_叠加Node3_1= this.Lib_叠加Node3_1;
- var Lib_叠加Node4_0= this.Lib_叠加Node4_0;
- var Lib_叠加Node4_1= this.Lib_叠加Node4_1;
- var Lib_叠加Node5_0= this.Lib_叠加Node5_0;
- var Lib_叠加Node5_1= this.Lib_叠加Node5_1;
- var Lib_叠加Node5_2= this.Lib_叠加Node5_2;
- var Lib_叠加Node5_3= this.Lib_叠加Node5_3;
- var Lib_叠加Node6_0= this.Lib_叠加Node6_0;
- var Lib_叠加Node6_1= this.Lib_叠加Node6_1;
- var Lib_叠加Node6_2= this.Lib_叠加Node6_2;
- var Lib_叠加Node6_3= this.Lib_叠加Node6_3;
- var Lib_叠加Node6_4= this.Lib_叠加Node6_4;
- /*@refresh1s@*/
- },
- refresh5s: function () {
-
- var localVarObj = this.localVarObj;
- var localDynamicVarObj = this.localDynamicVar();
- var zhuangtai= localVarObj.zhuangtai || localDynamicVarObj.zhuangtai;
- var bianhao= localVarObj.bianhao || localDynamicVarObj.bianhao;
- var fengsu= localVarObj.fengsu || localDynamicVarObj.fengsu;
- var gonglv= localVarObj.gonglv || localDynamicVarObj.gonglv;
- var Lib_叠加Node0_0= this.Lib_叠加Node0_0;
- var Lib_叠加Node0_1= this.Lib_叠加Node0_1;
- var Lib_叠加Node1_0= this.Lib_叠加Node1_0;
- var Lib_叠加Node1_1= this.Lib_叠加Node1_1;
- var Lib_叠加Node2_0= this.Lib_叠加Node2_0;
- var Lib_叠加Node2_1= this.Lib_叠加Node2_1;
- var Lib_叠加Node3_0= this.Lib_叠加Node3_0;
- var Lib_叠加Node3_1= this.Lib_叠加Node3_1;
- var Lib_叠加Node4_0= this.Lib_叠加Node4_0;
- var Lib_叠加Node4_1= this.Lib_叠加Node4_1;
- var Lib_叠加Node5_0= this.Lib_叠加Node5_0;
- var Lib_叠加Node5_1= this.Lib_叠加Node5_1;
- var Lib_叠加Node5_2= this.Lib_叠加Node5_2;
- var Lib_叠加Node5_3= this.Lib_叠加Node5_3;
- var Lib_叠加Node6_0= this.Lib_叠加Node6_0;
- var Lib_叠加Node6_1= this.Lib_叠加Node6_1;
- var Lib_叠加Node6_2= this.Lib_叠加Node6_2;
- var Lib_叠加Node6_3= this.Lib_叠加Node6_3;
- var Lib_叠加Node6_4= this.Lib_叠加Node6_4;
- /*@refresh5s@*/
- },
- /*@PageDynamic@*/
- onEvent: function (e, data, type, origin, offset, objMouseOn, ctm) {
-
- var localVarObj = this.localVarObj;
- var localDynamicVarObj = this.localDynamicVar();
- var zhuangtai= localVarObj.zhuangtai || localDynamicVarObj.zhuangtai;
- var bianhao= localVarObj.bianhao || localDynamicVarObj.bianhao;
- var fengsu= localVarObj.fengsu || localDynamicVarObj.fengsu;
- var gonglv= localVarObj.gonglv || localDynamicVarObj.gonglv;
- var Lib_叠加Node0_0= this.Lib_叠加Node0_0;
- var Lib_叠加Node0_1= this.Lib_叠加Node0_1;
- var Lib_叠加Node1_0= this.Lib_叠加Node1_0;
- var Lib_叠加Node1_1= this.Lib_叠加Node1_1;
- var Lib_叠加Node2_0= this.Lib_叠加Node2_0;
- var Lib_叠加Node2_1= this.Lib_叠加Node2_1;
- var Lib_叠加Node3_0= this.Lib_叠加Node3_0;
- var Lib_叠加Node3_1= this.Lib_叠加Node3_1;
- var Lib_叠加Node4_0= this.Lib_叠加Node4_0;
- var Lib_叠加Node4_1= this.Lib_叠加Node4_1;
- var Lib_叠加Node5_0= this.Lib_叠加Node5_0;
- var Lib_叠加Node5_1= this.Lib_叠加Node5_1;
- var Lib_叠加Node5_2= this.Lib_叠加Node5_2;
- var Lib_叠加Node5_3= this.Lib_叠加Node5_3;
- var Lib_叠加Node6_0= this.Lib_叠加Node6_0;
- var Lib_叠加Node6_1= this.Lib_叠加Node6_1;
- var Lib_叠加Node6_2= this.Lib_叠加Node6_2;
- var Lib_叠加Node6_3= this.Lib_叠加Node6_3;
- var Lib_叠加Node6_4= this.Lib_叠加Node6_4;
-
- 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);
- }
- });
- }
|