12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780 |
- ht.lib = ht.lib || {};
- if (!ht.lib['123']) {
- ht.lib['123'] = function (x, y, width, height, angle, localVarObj, localDynamicVar, nodename) {
- _ratio = GD.getRatioWithRotation(0, ratio);
- ht.lib['123'].superClass.constructor.apply(this);
- this.localVarObj = localVarObj;
- this.localDynamicVar = localDynamicVar;
- this.childNodes = [];
-
- this._styleObject = {};
- this._originWidth = 85.12164*_ratio.ratioX;
- this._originHeight = 58*_ratio.ratioY;
- this._baseClass = "ht.lib.123";
- 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_123Node0points=[27, 47,27, 57],
- Lib_123Node0rect=ht.Default.unionPoint([{x:27,y:47},{x:27,y:57}]),
- Lib_123Node0compspts=[];
- _ratio = GD.getRatioWithRotation(0, ratio);
- var _startratio = GD.getRatioWithRotation(4.71238898038469, ratio),
- _endratio = GD.getRatioWithRotation(7.85398163397448, ratio);
- for(var i=0;i<Lib_123Node0points.length;i++){
- if(i%2==0){
- Lib_123Node0compspts.push(Lib_123Node0points[i]-Lib_123Node0rect.x);
- }else{
- Lib_123Node0compspts.push(Lib_123Node0points[i]-Lib_123Node0rect.y);
- }
- }
- var Lib_123Node0ptslength=Lib_123Node0compspts.length;
- if (Lib_123Node0rect.height === 0) {
- Lib_123Node0compspts[0] -= 0;
- Lib_123Node0compspts[Lib_123Node0ptslength-2] += 0;
- } else if (Lib_123Node0rect.width === 0){
- Lib_123Node0compspts[1] -= 0;
- Lib_123Node0compspts[Lib_123Node0ptslength-1] += 0;
- } else {
- Lib_123Node0compspts[0] -= 0;
- Lib_123Node0compspts[1] -= 0;
- Lib_123Node0compspts[Lib_123Node0ptslength-2] += 0;
- Lib_123Node0compspts[Lib_123Node0ptslength-1] += 0;
- }
- Lib_123Node0 = new ht.Node();
- Lib_123Node0.borderWidth = 1;
- Lib_123Node0rect.width = Lib_123Node0rect.width === 0 ? 0.0001 : Lib_123Node0rect.width;
- Lib_123Node0rect.height = Lib_123Node0rect.height === 0 ? 0.0001 : Lib_123Node0rect.height;
- var Lib_123Node0endCompspts = [Lib_123Node0compspts[Lib_123Node0ptslength-2],Lib_123Node0compspts[Lib_123Node0ptslength-1],0,0];
- var Lib_123Node0startCompspts = [Lib_123Node0compspts[0],Lib_123Node0compspts[1],0,0];
- Lib_123Node0.setImage(GD.getPolyLineJSON());
- Lib_123Node0.setPosition(Lib_123Node0rect.x+Lib_123Node0rect.width/2,Lib_123Node0rect.y+Lib_123Node0rect.height/2);
- Lib_123Node0.setSize(Lib_123Node0rect.width,Lib_123Node0rect.height);
- Lib_123Node0.setStyle("opacity",1);
- Lib_123Node0.s({'pixelPerfect':true});
- Lib_123Node0borderwidth=1;
- Lib_123Node0.setRotation(0);
- dataModel.add(Lib_123Node0);
- Lib_123Node0.a('node.points',Lib_123Node0compspts);
- Lib_123Node0.a('node.segments',[1,2]);
- Lib_123Node0.a('node.color','rgba(255,0,255,1)');
- Lib_123Node0.a('node.borderPattern',getDashStyle("@borderPattern@"));
- Lib_123Node0.a('node.borderColor','rgba(255,0,255,1)');
- Lib_123Node0.a('node.background','rgba(255,0,255,1)');
- Lib_123Node0.a('node.gradient','');
- Lib_123Node0.a('node.gradientcolor','rgba(255,0,255,1)');
- Lib_123Node0.a('node.endCompspts',Lib_123Node0endCompspts);
- Lib_123Node0.a('node.startCompspts',Lib_123Node0startCompspts);
- (function (node, img, compspts, endCompspts, startCompspts) {
- var position = node.getPosition(),
- w = node.getWidth()*_ratio.ratioX,
- h = node.getHeight()*_ratio.ratioY;
- function resetPoints(rx, ry) {
- for (var i = 0, len = compspts.length; i < len; i++) {
- if (i%2 === 0) {
- compspts[i]*=rx;
- } else {
- compspts[i]*=ry;
- }
- }
- endCompspts[0] = compspts[compspts.length-2];
- endCompspts[1] = compspts[compspts.length-1];
- endCompspts[2] *= rx;
- endCompspts[3] *= ry;
- node.a('node.offsetEndY', -(endCompspts[3]*0.5));
- node.a('node.offsetEndX', -(endCompspts[2]*0.5));
-
- startCompspts[0] = compspts[0];
- startCompspts[1] = compspts[1];
- startCompspts[2] *= rx;
- startCompspts[3] *= ry;
- node.a('node.offsetStartY', -(startCompspts[3]*0.5));
- node.a('node.offsetStartX', -(startCompspts[2]*0.5));
- node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
- node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
- }
- node.setSize(w, h);
- node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
- node.a('node.width', w);
- node.a('node.height', h);
- resetPoints(_ratio.ratioX, _ratio.ratioY);
- node.borderWidth = 1;
- node.a('node.borderwidth',node.borderWidth);
- node._nodename = 'Lib_123Node0';
- node._nodeType = 'line';
- zoomNodeList.push({
- node: node,
- attr: 'node.borderwidth'
- });
- var setWidth = node.setWidth,
- setHeight = node.setHeight,
- timer, rx = 1, ry = 1;
-
- node.setWidth = function (width) {
- var _width = this.getWidth();
- rx = width / _width;
- node.a('node.width', width);
- setWidth.apply(this, arguments);
- resetPoints(rx, 1);
- }
- node.setHeight = function (height) {
- var _height = this.getHeight();
- ry = height / _height;
- node.a('node.height', height);
- setHeight.apply(this, arguments);
- resetPoints(1, ry);
- }
- })(Lib_123Node0, Lib_123Node0.getImage(), Lib_123Node0compspts, Lib_123Node0endCompspts, Lib_123Node0startCompspts);
- var Lib_123Node1points=[27, 57,77, 57],
- Lib_123Node1rect=ht.Default.unionPoint([{x:27,y:57},{x:77,y:57}]),
- Lib_123Node1compspts=[];
- _ratio = GD.getRatioWithRotation(0, ratio);
- var _startratio = GD.getRatioWithRotation(3.14159265358979, ratio),
- _endratio = GD.getRatioWithRotation(0, ratio);
- for(var i=0;i<Lib_123Node1points.length;i++){
- if(i%2==0){
- Lib_123Node1compspts.push(Lib_123Node1points[i]-Lib_123Node1rect.x);
- }else{
- Lib_123Node1compspts.push(Lib_123Node1points[i]-Lib_123Node1rect.y);
- }
- }
- var Lib_123Node1ptslength=Lib_123Node1compspts.length;
- if (Lib_123Node1rect.height === 0) {
- Lib_123Node1compspts[0] -= 0;
- Lib_123Node1compspts[Lib_123Node1ptslength-2] += 0;
- } else if (Lib_123Node1rect.width === 0){
- Lib_123Node1compspts[1] -= 0;
- Lib_123Node1compspts[Lib_123Node1ptslength-1] += 0;
- } else {
- Lib_123Node1compspts[0] -= 0;
- Lib_123Node1compspts[1] -= 0;
- Lib_123Node1compspts[Lib_123Node1ptslength-2] += 0;
- Lib_123Node1compspts[Lib_123Node1ptslength-1] += 0;
- }
- Lib_123Node1 = new ht.Node();
- Lib_123Node1.borderWidth = 1;
- Lib_123Node1rect.width = Lib_123Node1rect.width === 0 ? 0.0001 : Lib_123Node1rect.width;
- Lib_123Node1rect.height = Lib_123Node1rect.height === 0 ? 0.0001 : Lib_123Node1rect.height;
- var Lib_123Node1endCompspts = [Lib_123Node1compspts[Lib_123Node1ptslength-2],Lib_123Node1compspts[Lib_123Node1ptslength-1],0,0];
- var Lib_123Node1startCompspts = [Lib_123Node1compspts[0],Lib_123Node1compspts[1],0,0];
- Lib_123Node1.setImage(GD.getPolyLineJSON());
- Lib_123Node1.setPosition(Lib_123Node1rect.x+Lib_123Node1rect.width/2,Lib_123Node1rect.y+Lib_123Node1rect.height/2);
- Lib_123Node1.setSize(Lib_123Node1rect.width,Lib_123Node1rect.height);
- Lib_123Node1.setStyle("opacity",1);
- Lib_123Node1.s({'pixelPerfect':true});
- Lib_123Node1borderwidth=1;
- Lib_123Node1.setRotation(0);
- dataModel.add(Lib_123Node1);
- Lib_123Node1.a('node.points',Lib_123Node1compspts);
- Lib_123Node1.a('node.segments',[1,2]);
- Lib_123Node1.a('node.color','rgba(255,0,255,1)');
- Lib_123Node1.a('node.borderPattern',getDashStyle("@borderPattern@"));
- Lib_123Node1.a('node.borderColor','rgba(255,0,255,1)');
- Lib_123Node1.a('node.background','rgba(255,0,255,1)');
- Lib_123Node1.a('node.gradient','');
- Lib_123Node1.a('node.gradientcolor','rgba(255,0,255,1)');
- Lib_123Node1.a('node.endCompspts',Lib_123Node1endCompspts);
- Lib_123Node1.a('node.startCompspts',Lib_123Node1startCompspts);
- (function (node, img, compspts, endCompspts, startCompspts) {
- var position = node.getPosition(),
- w = node.getWidth()*_ratio.ratioX,
- h = node.getHeight()*_ratio.ratioY;
- function resetPoints(rx, ry) {
- for (var i = 0, len = compspts.length; i < len; i++) {
- if (i%2 === 0) {
- compspts[i]*=rx;
- } else {
- compspts[i]*=ry;
- }
- }
- endCompspts[0] = compspts[compspts.length-2];
- endCompspts[1] = compspts[compspts.length-1];
- endCompspts[2] *= rx;
- endCompspts[3] *= ry;
- node.a('node.offsetEndY', -(endCompspts[3]*0.5));
- node.a('node.offsetEndX', -(endCompspts[2]*0.5));
-
- startCompspts[0] = compspts[0];
- startCompspts[1] = compspts[1];
- startCompspts[2] *= rx;
- startCompspts[3] *= ry;
- node.a('node.offsetStartY', -(startCompspts[3]*0.5));
- node.a('node.offsetStartX', -(startCompspts[2]*0.5));
- node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
- node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
- }
- node.setSize(w, h);
- node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
- node.a('node.width', w);
- node.a('node.height', h);
- resetPoints(_ratio.ratioX, _ratio.ratioY);
- node.borderWidth = 1;
- node.a('node.borderwidth',node.borderWidth);
- node._nodename = 'Lib_123Node1';
- node._nodeType = 'line';
- zoomNodeList.push({
- node: node,
- attr: 'node.borderwidth'
- });
- var setWidth = node.setWidth,
- setHeight = node.setHeight,
- timer, rx = 1, ry = 1;
-
- node.setWidth = function (width) {
- var _width = this.getWidth();
- rx = width / _width;
- node.a('node.width', width);
- setWidth.apply(this, arguments);
- resetPoints(rx, 1);
- }
- node.setHeight = function (height) {
- var _height = this.getHeight();
- ry = height / _height;
- node.a('node.height', height);
- setHeight.apply(this, arguments);
- resetPoints(1, ry);
- }
- })(Lib_123Node1, Lib_123Node1.getImage(), Lib_123Node1compspts, Lib_123Node1endCompspts, Lib_123Node1startCompspts);
- _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
- var Lib_123Node2type = 'rect';
- var Lib_123Node2 = new ht.Node(),
- Lib_123Node2BorderWidth = 2*2;
- if (Lib_123Node2type === 'arc') {
- Lib_123Node2BorderWidth *= 2;
- }
- Lib_123Node2.setImage(GD.getRectJSON(15.36963*_ratio.ratioX, 25.91444*_ratio.ratioY, Lib_123Node2type, '@arcFrom@', '@arcTo@', '@arcClose@'));
- Lib_123Node2.setPosition(75*ratio.ratioX, 28*ratio.ratioY);
- Lib_123Node2.setSize(15.36963*_ratio.ratioX, 25.91444*_ratio.ratioY);
- Lib_123Node2.s({
- 'pixelPerfect':true
- /*@AddPara@*/
- });
- Lib_123Node2.a('node.width', 15.36963*_ratio.ratioX);
- Lib_123Node2.a('node.height', 25.91444*_ratio.ratioY);
- Lib_123Node2.a('node.type', Lib_123Node2type);
- Lib_123Node2.a('node.rect', [0, 0, 15.36963*_ratio.ratioX, 25.91444*_ratio.ratioY]);
- Lib_123Node2.a('node.background', 'rgba(255,255,255,0.003921569)');
- Lib_123Node2.a('node.gradientcolor', '');
- Lib_123Node2.a('node.gradient', '');
- Lib_123Node2.a('node.borderwidth', Lib_123Node2BorderWidth);
- Lib_123Node2.a('node.color', 'rgba(255,0,255,1)');
- Lib_123Node2.a('node.fillrect', [0,0,0,0]);
- Lib_123Node2.a('node.fillbackcolor', 'rgba(0,0,0,0)');
- Lib_123Node2.a('node.fillgradientcolor', 'rgba(0,0,0,0)');
- Lib_123Node2.a('node.fillgradient', '');
- if (Lib_123Node2type !== 'rect') {
- Lib_123Node2.a('node.arcFrom', parseFloat('@arcFrom@'));
- Lib_123Node2.a('node.arcTo', parseFloat('@arcTo@'));
- Lib_123Node2.a('node.arcClose', '@arcClose@' === 'true' ? true : false);
- }
- if (Lib_123Node2type === 'arc') {
- Lib_123Node2.a('node.arcOval', true);
- }
- Lib_123Node2.setRotation(0*Math.PI/180);
- Lib_123Node2.borderWidth = Lib_123Node2BorderWidth;
- Lib_123Node2.borderFillwidth = Lib_123Node2BorderWidth;
- dataModel.add(Lib_123Node2);
- Lib_123Node2._nodename = 'Lib_123Node2'
- Lib_123Node2._nodeType = 'rect';
- zoomNodeList.push({
- node: Lib_123Node2,
- attr: 'node.borderwidth'
- });
- (function (node, _img) {
- var setWidth = node.setWidth,
- setHeight = node.setHeight;
- node.setWidth = function (width) {
- if (width === this.getWidth()) return ;
- var height = this.getHeight();
- this.a('node.width', width);
- this.a('node.rect', [0,0,width, height]);
- setWidth.apply(this, arguments);
- }
- node.setHeight = function (height) {
- if (height === this.getHeight()) return ;
- var width = this.getWidth();
- this.a('node.height', height);
- this.a('node.rect', [0,0,width, height]);
- setHeight.apply(this, arguments);
- }
- })(Lib_123Node2, Lib_123Node2.getImage());var Lib_123Node3points=[75, 41,75, 50],
- Lib_123Node3rect=ht.Default.unionPoint([{x:75,y:41},{x:75,y:50}]),
- Lib_123Node3compspts=[];
- _ratio = GD.getRatioWithRotation(0, ratio);
- var _startratio = GD.getRatioWithRotation(4.71238898038469, ratio),
- _endratio = GD.getRatioWithRotation(7.85398163397448, ratio);
- for(var i=0;i<Lib_123Node3points.length;i++){
- if(i%2==0){
- Lib_123Node3compspts.push(Lib_123Node3points[i]-Lib_123Node3rect.x);
- }else{
- Lib_123Node3compspts.push(Lib_123Node3points[i]-Lib_123Node3rect.y);
- }
- }
- var Lib_123Node3ptslength=Lib_123Node3compspts.length;
- if (Lib_123Node3rect.height === 0) {
- Lib_123Node3compspts[0] -= 0;
- Lib_123Node3compspts[Lib_123Node3ptslength-2] += 0;
- } else if (Lib_123Node3rect.width === 0){
- Lib_123Node3compspts[1] -= 0;
- Lib_123Node3compspts[Lib_123Node3ptslength-1] += 0;
- } else {
- Lib_123Node3compspts[0] -= 0;
- Lib_123Node3compspts[1] -= 0;
- Lib_123Node3compspts[Lib_123Node3ptslength-2] += 0;
- Lib_123Node3compspts[Lib_123Node3ptslength-1] += 0;
- }
- Lib_123Node3 = new ht.Node();
- Lib_123Node3.borderWidth = 2;
- Lib_123Node3rect.width = Lib_123Node3rect.width === 0 ? 0.0001 : Lib_123Node3rect.width;
- Lib_123Node3rect.height = Lib_123Node3rect.height === 0 ? 0.0001 : Lib_123Node3rect.height;
- var Lib_123Node3endCompspts = [Lib_123Node3compspts[Lib_123Node3ptslength-2],Lib_123Node3compspts[Lib_123Node3ptslength-1],0,0];
- var Lib_123Node3startCompspts = [Lib_123Node3compspts[0],Lib_123Node3compspts[1],0,0];
- Lib_123Node3.setImage(GD.getPolyLineJSON());
- Lib_123Node3.setPosition(Lib_123Node3rect.x+Lib_123Node3rect.width/2,Lib_123Node3rect.y+Lib_123Node3rect.height/2);
- Lib_123Node3.setSize(Lib_123Node3rect.width,Lib_123Node3rect.height);
- Lib_123Node3.setStyle("opacity",1);
- Lib_123Node3.s({'pixelPerfect':true});
- Lib_123Node3borderwidth=2;
- Lib_123Node3.setRotation(0);
- dataModel.add(Lib_123Node3);
- Lib_123Node3.a('node.points',Lib_123Node3compspts);
- Lib_123Node3.a('node.segments',[1,2]);
- Lib_123Node3.a('node.color','rgba(255,0,255,1)');
- Lib_123Node3.a('node.borderPattern',getDashStyle("@borderPattern@"));
- Lib_123Node3.a('node.borderColor','rgba(255,0,255,1)');
- Lib_123Node3.a('node.background','rgba(255,0,255,1)');
- Lib_123Node3.a('node.gradient','');
- Lib_123Node3.a('node.gradientcolor','rgba(255,0,255,1)');
- Lib_123Node3.a('node.endCompspts',Lib_123Node3endCompspts);
- Lib_123Node3.a('node.startCompspts',Lib_123Node3startCompspts);
- (function (node, img, compspts, endCompspts, startCompspts) {
- var position = node.getPosition(),
- w = node.getWidth()*_ratio.ratioX,
- h = node.getHeight()*_ratio.ratioY;
- function resetPoints(rx, ry) {
- for (var i = 0, len = compspts.length; i < len; i++) {
- if (i%2 === 0) {
- compspts[i]*=rx;
- } else {
- compspts[i]*=ry;
- }
- }
- endCompspts[0] = compspts[compspts.length-2];
- endCompspts[1] = compspts[compspts.length-1];
- endCompspts[2] *= rx;
- endCompspts[3] *= ry;
- node.a('node.offsetEndY', -(endCompspts[3]*0.5));
- node.a('node.offsetEndX', -(endCompspts[2]*0.5));
-
- startCompspts[0] = compspts[0];
- startCompspts[1] = compspts[1];
- startCompspts[2] *= rx;
- startCompspts[3] *= ry;
- node.a('node.offsetStartY', -(startCompspts[3]*0.5));
- node.a('node.offsetStartX', -(startCompspts[2]*0.5));
- node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
- node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
- }
- node.setSize(w, h);
- node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
- node.a('node.width', w);
- node.a('node.height', h);
- resetPoints(_ratio.ratioX, _ratio.ratioY);
- node.borderWidth = 2;
- node.a('node.borderwidth',node.borderWidth);
- node._nodename = 'Lib_123Node3';
- node._nodeType = 'line';
- zoomNodeList.push({
- node: node,
- attr: 'node.borderwidth'
- });
- var setWidth = node.setWidth,
- setHeight = node.setHeight,
- timer, rx = 1, ry = 1;
-
- node.setWidth = function (width) {
- var _width = this.getWidth();
- rx = width / _width;
- node.a('node.width', width);
- setWidth.apply(this, arguments);
- resetPoints(rx, 1);
- }
- node.setHeight = function (height) {
- var _height = this.getHeight();
- ry = height / _height;
- node.a('node.height', height);
- setHeight.apply(this, arguments);
- resetPoints(1, ry);
- }
- })(Lib_123Node3, Lib_123Node3.getImage(), Lib_123Node3compspts, Lib_123Node3endCompspts, Lib_123Node3startCompspts);
- var Lib_123Node4points=[75, 0,75, 27],
- Lib_123Node4rect=ht.Default.unionPoint([{x:75,y:0},{x:75,y:27}]),
- Lib_123Node4compspts=[];
- _ratio = GD.getRatioWithRotation(0, ratio);
- var _startratio = GD.getRatioWithRotation(4.71238898038469, ratio),
- _endratio = GD.getRatioWithRotation(7.85398163397448, ratio);
- for(var i=0;i<Lib_123Node4points.length;i++){
- if(i%2==0){
- Lib_123Node4compspts.push(Lib_123Node4points[i]-Lib_123Node4rect.x);
- }else{
- Lib_123Node4compspts.push(Lib_123Node4points[i]-Lib_123Node4rect.y);
- }
- }
- var Lib_123Node4ptslength=Lib_123Node4compspts.length;
- if (Lib_123Node4rect.height === 0) {
- Lib_123Node4compspts[0] -= 0;
- Lib_123Node4compspts[Lib_123Node4ptslength-2] += 0;
- } else if (Lib_123Node4rect.width === 0){
- Lib_123Node4compspts[1] -= 0;
- Lib_123Node4compspts[Lib_123Node4ptslength-1] += 0;
- } else {
- Lib_123Node4compspts[0] -= 0;
- Lib_123Node4compspts[1] -= 0;
- Lib_123Node4compspts[Lib_123Node4ptslength-2] += 0;
- Lib_123Node4compspts[Lib_123Node4ptslength-1] += 0;
- }
- Lib_123Node4 = new ht.Node();
- Lib_123Node4.borderWidth = 2;
- Lib_123Node4rect.width = Lib_123Node4rect.width === 0 ? 0.0001 : Lib_123Node4rect.width;
- Lib_123Node4rect.height = Lib_123Node4rect.height === 0 ? 0.0001 : Lib_123Node4rect.height;
- var Lib_123Node4endCompspts = [Lib_123Node4compspts[Lib_123Node4ptslength-2],Lib_123Node4compspts[Lib_123Node4ptslength-1],0,0];
- var Lib_123Node4startCompspts = [Lib_123Node4compspts[0],Lib_123Node4compspts[1],0,0];
- Lib_123Node4.setImage(GD.getPolyLineJSON());
- Lib_123Node4.setPosition(Lib_123Node4rect.x+Lib_123Node4rect.width/2,Lib_123Node4rect.y+Lib_123Node4rect.height/2);
- Lib_123Node4.setSize(Lib_123Node4rect.width,Lib_123Node4rect.height);
- Lib_123Node4.setStyle("opacity",1);
- Lib_123Node4.s({'pixelPerfect':true});
- Lib_123Node4borderwidth=2;
- Lib_123Node4.setRotation(0);
- dataModel.add(Lib_123Node4);
- Lib_123Node4.a('node.points',Lib_123Node4compspts);
- Lib_123Node4.a('node.segments',[1,2]);
- Lib_123Node4.a('node.color','rgba(255,0,255,1)');
- Lib_123Node4.a('node.borderPattern',getDashStyle("@borderPattern@"));
- Lib_123Node4.a('node.borderColor','rgba(255,0,255,1)');
- Lib_123Node4.a('node.background','rgba(255,0,255,1)');
- Lib_123Node4.a('node.gradient','');
- Lib_123Node4.a('node.gradientcolor','rgba(255,0,255,1)');
- Lib_123Node4.a('node.endCompspts',Lib_123Node4endCompspts);
- Lib_123Node4.a('node.startCompspts',Lib_123Node4startCompspts);
- (function (node, img, compspts, endCompspts, startCompspts) {
- var position = node.getPosition(),
- w = node.getWidth()*_ratio.ratioX,
- h = node.getHeight()*_ratio.ratioY;
- function resetPoints(rx, ry) {
- for (var i = 0, len = compspts.length; i < len; i++) {
- if (i%2 === 0) {
- compspts[i]*=rx;
- } else {
- compspts[i]*=ry;
- }
- }
- endCompspts[0] = compspts[compspts.length-2];
- endCompspts[1] = compspts[compspts.length-1];
- endCompspts[2] *= rx;
- endCompspts[3] *= ry;
- node.a('node.offsetEndY', -(endCompspts[3]*0.5));
- node.a('node.offsetEndX', -(endCompspts[2]*0.5));
-
- startCompspts[0] = compspts[0];
- startCompspts[1] = compspts[1];
- startCompspts[2] *= rx;
- startCompspts[3] *= ry;
- node.a('node.offsetStartY', -(startCompspts[3]*0.5));
- node.a('node.offsetStartX', -(startCompspts[2]*0.5));
- node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
- node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
- }
- node.setSize(w, h);
- node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
- node.a('node.width', w);
- node.a('node.height', h);
- resetPoints(_ratio.ratioX, _ratio.ratioY);
- node.borderWidth = 2;
- node.a('node.borderwidth',node.borderWidth);
- node._nodename = 'Lib_123Node4';
- node._nodeType = 'line';
- zoomNodeList.push({
- node: node,
- attr: 'node.borderwidth'
- });
- var setWidth = node.setWidth,
- setHeight = node.setHeight,
- timer, rx = 1, ry = 1;
-
- node.setWidth = function (width) {
- var _width = this.getWidth();
- rx = width / _width;
- node.a('node.width', width);
- setWidth.apply(this, arguments);
- resetPoints(rx, 1);
- }
- node.setHeight = function (height) {
- var _height = this.getHeight();
- ry = height / _height;
- node.a('node.height', height);
- setHeight.apply(this, arguments);
- resetPoints(1, ry);
- }
- })(Lib_123Node4, Lib_123Node4.getImage(), Lib_123Node4compspts, Lib_123Node4endCompspts, Lib_123Node4startCompspts);
- var Lib_123Node5rect=ht.Default.unionPoint([{x: 70, y: 20},{x: 70, y: 20},{x: 79, y: 20},{x: 75, y: 28}]),
- Lib_123Node5points=[70,20,70,20,79,20,75,28],
- Lib_123Node5compsPoints=[],
- Lib_123Node5SetPoints = [{x: 70, y: 20},{x: 70, y: 20},{x: 79, y: 20},{x: 75, y: 28}],
- Lib_123Node5setSegments = [1,2,2,2];
- _ratio = GD.getRatioWithRotation(0, ratio);
- for(var i=0;i<Lib_123Node5points.length;i++){
- if(i%2==0){
- Lib_123Node5compsPoints.push(Lib_123Node5points[i]-Lib_123Node5rect.x);
- }else{
- Lib_123Node5compsPoints.push(Lib_123Node5points[i]-Lib_123Node5rect.y);
- }
- }
- var Lib_123Node5 = new ht.Node();
- Lib_123Node5.setImage(GD.getPolyGonJSON());
- Lib_123Node5.setPosition(Lib_123Node5rect.x + Lib_123Node5rect.width/2, Lib_123Node5rect.y + Lib_123Node5rect.height/2);
- Lib_123Node5.setSize(Lib_123Node5rect.width, Lib_123Node5rect.height);
- Lib_123Node5.setRotation(0);
- Lib_123Node5.borderWidth=2;
- Lib_123Node5.borderFillwidth=2*2;
- Lib_123Node5.s({'pixelPerfect':true});
- dataModel.add(Lib_123Node5);
- // Lib_123Node5.a('node.width', Lib_123Node5rect.width*_ratio.ratioX);
- // Lib_123Node5.a('node.height', Lib_123Node5rect.height*_ratio.ratioY);
- Lib_123Node5.a('node.clip', function(g,width,height,data) {
- var clippoints = Lib_123Node5SetPoints;
- if(clippoints.length<=3) return;
- if(Lib_123Node5.a('Lib_123Node5.isFill')=="false") return;
- var clipcompsPoints=[];
- var rect = ht.Default.unionPoint(clippoints);
- for(var i=0;i<clippoints.length;i++){
- clipcompsPoints.push({x:clippoints[i].x-rect.x,y:clippoints[i].y-rect.y});
- }
- var clipsegments=Lib_123Node5setSegments;
- g.beginPath();
- drawPoints(g,clipcompsPoints,clipsegments);
- g.clip();
- })
- Lib_123Node5.a('node.type', 'shape');
- Lib_123Node5.a('node.comsPoints', Lib_123Node5compsPoints);
- Lib_123Node5.a('node.closePath', true);
- Lib_123Node5.a('node.borderwidth', 2);
- Lib_123Node5.a('node.color', 'rgba(255,0,255,1)');
- Lib_123Node5.a('node.background','rgba(255,128,0,1)');
- Lib_123Node5.a('node.closePath', true);
- Lib_123Node5.a('node.closePath', true);
- Lib_123Node5.a('node.gradient','');
- Lib_123Node5.a('node.gradientcolor','rgba(255,128,0,1)');
- Lib_123Node5.a('node.isFill','false');
- Lib_123Node5.a('node.original',[0,0,0,0]);
- Lib_123Node5.a('node.fillrect',[0,0,0,0]);
- Lib_123Node5.a('node.fillbackcolor','rgba(255,128,0,1)');
- Lib_123Node5.a('node.fillgradient','');
- Lib_123Node5.a('node.fillgradientcolor','rgba(255,128,0,1)');
- Lib_123Node5.a('node.segments',Lib_123Node5setSegments);
- Lib_123Node5.a('node.borderPattern',"");
- (function (node, nodecompsPoints, setPoints) {
- var w = node.getWidth()*_ratio.ratioX,
- h = node.getHeight()*_ratio.ratioY,
- img = node.getImage();
- function resetPoints(rx, ry) {
- for (var i = 0, len = nodecompsPoints.length; i < len; i++) {
- if (i%2 === 0) {
- nodecompsPoints[i]*=rx;
- } else {
- nodecompsPoints[i]*=ry;
- }
- if (setPoints[i]) {
- setPoints[i].x *= rx;
- setPoints[i].y *= ry;
- }
- }
- }
- node.setSize(w, h);
- node.a('node.width', w);
- node.a('node.height', h);
- resetPoints(_ratio.ratioX, _ratio.ratioY);
- var position = node.getPosition();
- node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
- node._nodename = 'Lib_123Node5';
- node._nodeType = 'polygon';
- zoomNodeList.push({
- node: node,
- attr: 'node.borderwidth'
- });
- // 重载setWidth, setHeight
- var setWidth = node.setWidth,
- setHeight = node.setHeight,
- timer, rx = 1, ry = 1;
- node.setWidth = function (width) {
- var _width = this.getWidth();
- rx = width / _width;
- node.a('node.width', width);
- setWidth.apply(this, arguments);
- resetPoints(rx, 1);
- }
- node.setHeight = function (height) {
- var _height = this.getHeight();
- ry = height / _height;
- node.a('node.height', height);
- setHeight.apply(this, arguments);
- resetPoints(1, ry);
- }
- })(Lib_123Node5, Lib_123Node5compsPoints, Lib_123Node5SetPoints );
- var Lib_123Node6points=[71, 55,79, 55],
- Lib_123Node6rect=ht.Default.unionPoint([{x:71,y:55},{x:79,y:55}]),
- Lib_123Node6compspts=[];
- _ratio = GD.getRatioWithRotation(0, ratio);
- var _startratio = GD.getRatioWithRotation(3.14159265358979, ratio),
- _endratio = GD.getRatioWithRotation(0, ratio);
- for(var i=0;i<Lib_123Node6points.length;i++){
- if(i%2==0){
- Lib_123Node6compspts.push(Lib_123Node6points[i]-Lib_123Node6rect.x);
- }else{
- Lib_123Node6compspts.push(Lib_123Node6points[i]-Lib_123Node6rect.y);
- }
- }
- var Lib_123Node6ptslength=Lib_123Node6compspts.length;
- if (Lib_123Node6rect.height === 0) {
- Lib_123Node6compspts[0] -= 0;
- Lib_123Node6compspts[Lib_123Node6ptslength-2] += 0;
- } else if (Lib_123Node6rect.width === 0){
- Lib_123Node6compspts[1] -= 0;
- Lib_123Node6compspts[Lib_123Node6ptslength-1] += 0;
- } else {
- Lib_123Node6compspts[0] -= 0;
- Lib_123Node6compspts[1] -= 0;
- Lib_123Node6compspts[Lib_123Node6ptslength-2] += 0;
- Lib_123Node6compspts[Lib_123Node6ptslength-1] += 0;
- }
- Lib_123Node6 = new ht.Node();
- Lib_123Node6.borderWidth = 2;
- Lib_123Node6rect.width = Lib_123Node6rect.width === 0 ? 0.0001 : Lib_123Node6rect.width;
- Lib_123Node6rect.height = Lib_123Node6rect.height === 0 ? 0.0001 : Lib_123Node6rect.height;
- var Lib_123Node6endCompspts = [Lib_123Node6compspts[Lib_123Node6ptslength-2],Lib_123Node6compspts[Lib_123Node6ptslength-1],0,0];
- var Lib_123Node6startCompspts = [Lib_123Node6compspts[0],Lib_123Node6compspts[1],0,0];
- Lib_123Node6.setImage(GD.getPolyLineJSON());
- Lib_123Node6.setPosition(Lib_123Node6rect.x+Lib_123Node6rect.width/2,Lib_123Node6rect.y+Lib_123Node6rect.height/2);
- Lib_123Node6.setSize(Lib_123Node6rect.width,Lib_123Node6rect.height);
- Lib_123Node6.setStyle("opacity",1);
- Lib_123Node6.s({'pixelPerfect':true});
- Lib_123Node6borderwidth=2;
- Lib_123Node6.setRotation(0);
- dataModel.add(Lib_123Node6);
- Lib_123Node6.a('node.points',Lib_123Node6compspts);
- Lib_123Node6.a('node.segments',[1,2]);
- Lib_123Node6.a('node.color','rgba(255,0,255,1)');
- Lib_123Node6.a('node.borderPattern',getDashStyle("@borderPattern@"));
- Lib_123Node6.a('node.borderColor','rgba(255,0,255,1)');
- Lib_123Node6.a('node.background','rgba(255,0,255,1)');
- Lib_123Node6.a('node.gradient','');
- Lib_123Node6.a('node.gradientcolor','rgba(255,0,255,1)');
- Lib_123Node6.a('node.endCompspts',Lib_123Node6endCompspts);
- Lib_123Node6.a('node.startCompspts',Lib_123Node6startCompspts);
- (function (node, img, compspts, endCompspts, startCompspts) {
- var position = node.getPosition(),
- w = node.getWidth()*_ratio.ratioX,
- h = node.getHeight()*_ratio.ratioY;
- function resetPoints(rx, ry) {
- for (var i = 0, len = compspts.length; i < len; i++) {
- if (i%2 === 0) {
- compspts[i]*=rx;
- } else {
- compspts[i]*=ry;
- }
- }
- endCompspts[0] = compspts[compspts.length-2];
- endCompspts[1] = compspts[compspts.length-1];
- endCompspts[2] *= rx;
- endCompspts[3] *= ry;
- node.a('node.offsetEndY', -(endCompspts[3]*0.5));
- node.a('node.offsetEndX', -(endCompspts[2]*0.5));
-
- startCompspts[0] = compspts[0];
- startCompspts[1] = compspts[1];
- startCompspts[2] *= rx;
- startCompspts[3] *= ry;
- node.a('node.offsetStartY', -(startCompspts[3]*0.5));
- node.a('node.offsetStartX', -(startCompspts[2]*0.5));
- node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
- node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
- }
- node.setSize(w, h);
- node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
- node.a('node.width', w);
- node.a('node.height', h);
- resetPoints(_ratio.ratioX, _ratio.ratioY);
- node.borderWidth = 2;
- node.a('node.borderwidth',node.borderWidth);
- node._nodename = 'Lib_123Node6';
- node._nodeType = 'line';
- zoomNodeList.push({
- node: node,
- attr: 'node.borderwidth'
- });
- var setWidth = node.setWidth,
- setHeight = node.setHeight,
- timer, rx = 1, ry = 1;
-
- node.setWidth = function (width) {
- var _width = this.getWidth();
- rx = width / _width;
- node.a('node.width', width);
- setWidth.apply(this, arguments);
- resetPoints(rx, 1);
- }
- node.setHeight = function (height) {
- var _height = this.getHeight();
- ry = height / _height;
- node.a('node.height', height);
- setHeight.apply(this, arguments);
- resetPoints(1, ry);
- }
- })(Lib_123Node6, Lib_123Node6.getImage(), Lib_123Node6compspts, Lib_123Node6endCompspts, Lib_123Node6startCompspts);
- var Lib_123Node7points=[67, 52,82, 52],
- Lib_123Node7rect=ht.Default.unionPoint([{x:67,y:52},{x:82,y:52}]),
- Lib_123Node7compspts=[];
- _ratio = GD.getRatioWithRotation(0, ratio);
- var _startratio = GD.getRatioWithRotation(3.14159265358979, ratio),
- _endratio = GD.getRatioWithRotation(0, ratio);
- for(var i=0;i<Lib_123Node7points.length;i++){
- if(i%2==0){
- Lib_123Node7compspts.push(Lib_123Node7points[i]-Lib_123Node7rect.x);
- }else{
- Lib_123Node7compspts.push(Lib_123Node7points[i]-Lib_123Node7rect.y);
- }
- }
- var Lib_123Node7ptslength=Lib_123Node7compspts.length;
- if (Lib_123Node7rect.height === 0) {
- Lib_123Node7compspts[0] -= 0;
- Lib_123Node7compspts[Lib_123Node7ptslength-2] += 0;
- } else if (Lib_123Node7rect.width === 0){
- Lib_123Node7compspts[1] -= 0;
- Lib_123Node7compspts[Lib_123Node7ptslength-1] += 0;
- } else {
- Lib_123Node7compspts[0] -= 0;
- Lib_123Node7compspts[1] -= 0;
- Lib_123Node7compspts[Lib_123Node7ptslength-2] += 0;
- Lib_123Node7compspts[Lib_123Node7ptslength-1] += 0;
- }
- Lib_123Node7 = new ht.Node();
- Lib_123Node7.borderWidth = 2;
- Lib_123Node7rect.width = Lib_123Node7rect.width === 0 ? 0.0001 : Lib_123Node7rect.width;
- Lib_123Node7rect.height = Lib_123Node7rect.height === 0 ? 0.0001 : Lib_123Node7rect.height;
- var Lib_123Node7endCompspts = [Lib_123Node7compspts[Lib_123Node7ptslength-2],Lib_123Node7compspts[Lib_123Node7ptslength-1],0,0];
- var Lib_123Node7startCompspts = [Lib_123Node7compspts[0],Lib_123Node7compspts[1],0,0];
- Lib_123Node7.setImage(GD.getPolyLineJSON());
- Lib_123Node7.setPosition(Lib_123Node7rect.x+Lib_123Node7rect.width/2,Lib_123Node7rect.y+Lib_123Node7rect.height/2);
- Lib_123Node7.setSize(Lib_123Node7rect.width,Lib_123Node7rect.height);
- Lib_123Node7.setStyle("opacity",1);
- Lib_123Node7.s({'pixelPerfect':true});
- Lib_123Node7borderwidth=2;
- Lib_123Node7.setRotation(0);
- dataModel.add(Lib_123Node7);
- Lib_123Node7.a('node.points',Lib_123Node7compspts);
- Lib_123Node7.a('node.segments',[1,2]);
- Lib_123Node7.a('node.color','rgba(255,0,255,1)');
- Lib_123Node7.a('node.borderPattern',getDashStyle("@borderPattern@"));
- Lib_123Node7.a('node.borderColor','rgba(255,0,255,1)');
- Lib_123Node7.a('node.background','rgba(255,0,255,1)');
- Lib_123Node7.a('node.gradient','');
- Lib_123Node7.a('node.gradientcolor','rgba(255,0,255,1)');
- Lib_123Node7.a('node.endCompspts',Lib_123Node7endCompspts);
- Lib_123Node7.a('node.startCompspts',Lib_123Node7startCompspts);
- (function (node, img, compspts, endCompspts, startCompspts) {
- var position = node.getPosition(),
- w = node.getWidth()*_ratio.ratioX,
- h = node.getHeight()*_ratio.ratioY;
- function resetPoints(rx, ry) {
- for (var i = 0, len = compspts.length; i < len; i++) {
- if (i%2 === 0) {
- compspts[i]*=rx;
- } else {
- compspts[i]*=ry;
- }
- }
- endCompspts[0] = compspts[compspts.length-2];
- endCompspts[1] = compspts[compspts.length-1];
- endCompspts[2] *= rx;
- endCompspts[3] *= ry;
- node.a('node.offsetEndY', -(endCompspts[3]*0.5));
- node.a('node.offsetEndX', -(endCompspts[2]*0.5));
-
- startCompspts[0] = compspts[0];
- startCompspts[1] = compspts[1];
- startCompspts[2] *= rx;
- startCompspts[3] *= ry;
- node.a('node.offsetStartY', -(startCompspts[3]*0.5));
- node.a('node.offsetStartX', -(startCompspts[2]*0.5));
- node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
- node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
- }
- node.setSize(w, h);
- node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
- node.a('node.width', w);
- node.a('node.height', h);
- resetPoints(_ratio.ratioX, _ratio.ratioY);
- node.borderWidth = 2;
- node.a('node.borderwidth',node.borderWidth);
- node._nodename = 'Lib_123Node7';
- node._nodeType = 'line';
- zoomNodeList.push({
- node: node,
- attr: 'node.borderwidth'
- });
- var setWidth = node.setWidth,
- setHeight = node.setHeight,
- timer, rx = 1, ry = 1;
-
- node.setWidth = function (width) {
- var _width = this.getWidth();
- rx = width / _width;
- node.a('node.width', width);
- setWidth.apply(this, arguments);
- resetPoints(rx, 1);
- }
- node.setHeight = function (height) {
- var _height = this.getHeight();
- ry = height / _height;
- node.a('node.height', height);
- setHeight.apply(this, arguments);
- resetPoints(1, ry);
- }
- })(Lib_123Node7, Lib_123Node7.getImage(), Lib_123Node7compspts, Lib_123Node7endCompspts, Lib_123Node7startCompspts);
- var Lib_123Node8points=[66, 49,85, 49],
- Lib_123Node8rect=ht.Default.unionPoint([{x:66,y:49},{x:85,y:49}]),
- Lib_123Node8compspts=[];
- _ratio = GD.getRatioWithRotation(0, ratio);
- var _startratio = GD.getRatioWithRotation(3.14159265358979, ratio),
- _endratio = GD.getRatioWithRotation(0, ratio);
- for(var i=0;i<Lib_123Node8points.length;i++){
- if(i%2==0){
- Lib_123Node8compspts.push(Lib_123Node8points[i]-Lib_123Node8rect.x);
- }else{
- Lib_123Node8compspts.push(Lib_123Node8points[i]-Lib_123Node8rect.y);
- }
- }
- var Lib_123Node8ptslength=Lib_123Node8compspts.length;
- if (Lib_123Node8rect.height === 0) {
- Lib_123Node8compspts[0] -= 0;
- Lib_123Node8compspts[Lib_123Node8ptslength-2] += 0;
- } else if (Lib_123Node8rect.width === 0){
- Lib_123Node8compspts[1] -= 0;
- Lib_123Node8compspts[Lib_123Node8ptslength-1] += 0;
- } else {
- Lib_123Node8compspts[0] -= 0;
- Lib_123Node8compspts[1] -= 0;
- Lib_123Node8compspts[Lib_123Node8ptslength-2] += 0;
- Lib_123Node8compspts[Lib_123Node8ptslength-1] += 0;
- }
- Lib_123Node8 = new ht.Node();
- Lib_123Node8.borderWidth = 2;
- Lib_123Node8rect.width = Lib_123Node8rect.width === 0 ? 0.0001 : Lib_123Node8rect.width;
- Lib_123Node8rect.height = Lib_123Node8rect.height === 0 ? 0.0001 : Lib_123Node8rect.height;
- var Lib_123Node8endCompspts = [Lib_123Node8compspts[Lib_123Node8ptslength-2],Lib_123Node8compspts[Lib_123Node8ptslength-1],0,0];
- var Lib_123Node8startCompspts = [Lib_123Node8compspts[0],Lib_123Node8compspts[1],0,0];
- Lib_123Node8.setImage(GD.getPolyLineJSON());
- Lib_123Node8.setPosition(Lib_123Node8rect.x+Lib_123Node8rect.width/2,Lib_123Node8rect.y+Lib_123Node8rect.height/2);
- Lib_123Node8.setSize(Lib_123Node8rect.width,Lib_123Node8rect.height);
- Lib_123Node8.setStyle("opacity",1);
- Lib_123Node8.s({'pixelPerfect':true});
- Lib_123Node8borderwidth=2;
- Lib_123Node8.setRotation(0);
- dataModel.add(Lib_123Node8);
- Lib_123Node8.a('node.points',Lib_123Node8compspts);
- Lib_123Node8.a('node.segments',[1,2]);
- Lib_123Node8.a('node.color','rgba(255,0,255,1)');
- Lib_123Node8.a('node.borderPattern',getDashStyle("@borderPattern@"));
- Lib_123Node8.a('node.borderColor','rgba(255,0,255,1)');
- Lib_123Node8.a('node.background','rgba(255,0,255,1)');
- Lib_123Node8.a('node.gradient','');
- Lib_123Node8.a('node.gradientcolor','rgba(255,0,255,1)');
- Lib_123Node8.a('node.endCompspts',Lib_123Node8endCompspts);
- Lib_123Node8.a('node.startCompspts',Lib_123Node8startCompspts);
- (function (node, img, compspts, endCompspts, startCompspts) {
- var position = node.getPosition(),
- w = node.getWidth()*_ratio.ratioX,
- h = node.getHeight()*_ratio.ratioY;
- function resetPoints(rx, ry) {
- for (var i = 0, len = compspts.length; i < len; i++) {
- if (i%2 === 0) {
- compspts[i]*=rx;
- } else {
- compspts[i]*=ry;
- }
- }
- endCompspts[0] = compspts[compspts.length-2];
- endCompspts[1] = compspts[compspts.length-1];
- endCompspts[2] *= rx;
- endCompspts[3] *= ry;
- node.a('node.offsetEndY', -(endCompspts[3]*0.5));
- node.a('node.offsetEndX', -(endCompspts[2]*0.5));
-
- startCompspts[0] = compspts[0];
- startCompspts[1] = compspts[1];
- startCompspts[2] *= rx;
- startCompspts[3] *= ry;
- node.a('node.offsetStartY', -(startCompspts[3]*0.5));
- node.a('node.offsetStartX', -(startCompspts[2]*0.5));
- node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
- node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
- }
- node.setSize(w, h);
- node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
- node.a('node.width', w);
- node.a('node.height', h);
- resetPoints(_ratio.ratioX, _ratio.ratioY);
- node.borderWidth = 2;
- node.a('node.borderwidth',node.borderWidth);
- node._nodename = 'Lib_123Node8';
- node._nodeType = 'line';
- zoomNodeList.push({
- node: node,
- attr: 'node.borderwidth'
- });
- var setWidth = node.setWidth,
- setHeight = node.setHeight,
- timer, rx = 1, ry = 1;
-
- node.setWidth = function (width) {
- var _width = this.getWidth();
- rx = width / _width;
- node.a('node.width', width);
- setWidth.apply(this, arguments);
- resetPoints(rx, 1);
- }
- node.setHeight = function (height) {
- var _height = this.getHeight();
- ry = height / _height;
- node.a('node.height', height);
- setHeight.apply(this, arguments);
- resetPoints(1, ry);
- }
- })(Lib_123Node8, Lib_123Node8.getImage(), Lib_123Node8compspts, Lib_123Node8endCompspts, Lib_123Node8startCompspts);
- _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
- var Lib_123Node9type = 'oval';
- var Lib_123Node9 = new ht.Node(),
- Lib_123Node9BorderWidth = 2*2;
- if (Lib_123Node9type === 'arc') {
- Lib_123Node9BorderWidth *= 2;
- }
- Lib_123Node9.setImage(GD.getRectJSON(24.12698*_ratio.ratioX, 20.63269*_ratio.ratioY, Lib_123Node9type, '@arcFrom@', '@arcTo@', '@arcClose@'));
- Lib_123Node9.setPosition(30*ratio.ratioX, 19*ratio.ratioY);
- Lib_123Node9.setSize(24.12698*_ratio.ratioX, 20.63269*_ratio.ratioY);
- Lib_123Node9.s({
- 'pixelPerfect':true
- /*@AddPara@*/
- });
- Lib_123Node9.a('node.width', 24.12698*_ratio.ratioX);
- Lib_123Node9.a('node.height', 20.63269*_ratio.ratioY);
- Lib_123Node9.a('node.type', Lib_123Node9type);
- Lib_123Node9.a('node.rect', [0, 0, 24.12698*_ratio.ratioX, 20.63269*_ratio.ratioY]);
- Lib_123Node9.a('node.background', 'rgba(255,255,255,0.003921569)');
- Lib_123Node9.a('node.gradientcolor', '');
- Lib_123Node9.a('node.gradient', '');
- Lib_123Node9.a('node.borderwidth', Lib_123Node9BorderWidth);
- Lib_123Node9.a('node.color', 'rgba(255,0,255,1)');
- Lib_123Node9.a('node.fillrect', [0,0,0,0]);
- Lib_123Node9.a('node.fillbackcolor', 'rgba(0,0,0,0)');
- Lib_123Node9.a('node.fillgradientcolor', 'rgba(0,0,0,0)');
- Lib_123Node9.a('node.fillgradient', '');
- if (Lib_123Node9type !== 'rect') {
- Lib_123Node9.a('node.arcFrom', parseFloat('@arcFrom@'));
- Lib_123Node9.a('node.arcTo', parseFloat('@arcTo@'));
- Lib_123Node9.a('node.arcClose', '@arcClose@' === 'true' ? true : false);
- }
- if (Lib_123Node9type === 'arc') {
- Lib_123Node9.a('node.arcOval', true);
- }
- Lib_123Node9.setRotation(0*Math.PI/180);
- Lib_123Node9.borderWidth = Lib_123Node9BorderWidth;
- Lib_123Node9.borderFillwidth = Lib_123Node9BorderWidth;
- dataModel.add(Lib_123Node9);
- Lib_123Node9._nodename = 'Lib_123Node9'
- Lib_123Node9._nodeType = 'rect';
- zoomNodeList.push({
- node: Lib_123Node9,
- attr: 'node.borderwidth'
- });
- (function (node, _img) {
- var setWidth = node.setWidth,
- setHeight = node.setHeight;
- node.setWidth = function (width) {
- if (width === this.getWidth()) return ;
- var height = this.getHeight();
- this.a('node.width', width);
- this.a('node.rect', [0,0,width, height]);
- setWidth.apply(this, arguments);
- }
- node.setHeight = function (height) {
- if (height === this.getHeight()) return ;
- var width = this.getWidth();
- this.a('node.height', height);
- this.a('node.rect', [0,0,width, height]);
- setHeight.apply(this, arguments);
- }
- })(Lib_123Node9, Lib_123Node9.getImage());_ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
- var Lib_123Node10type = 'oval';
- var Lib_123Node10 = new ht.Node(),
- Lib_123Node10BorderWidth = 2*2;
- if (Lib_123Node10type === 'arc') {
- Lib_123Node10BorderWidth *= 2;
- }
- Lib_123Node10.setImage(GD.getRectJSON(24.12698*_ratio.ratioX, 20.63269*_ratio.ratioY, Lib_123Node10type, '@arcFrom@', '@arcTo@', '@arcClose@'));
- Lib_123Node10.setPosition(12*ratio.ratioX, 27*ratio.ratioY);
- Lib_123Node10.setSize(24.12698*_ratio.ratioX, 20.63269*_ratio.ratioY);
- Lib_123Node10.s({
- 'pixelPerfect':true
- /*@AddPara@*/
- });
- Lib_123Node10.a('node.width', 24.12698*_ratio.ratioX);
- Lib_123Node10.a('node.height', 20.63269*_ratio.ratioY);
- Lib_123Node10.a('node.type', Lib_123Node10type);
- Lib_123Node10.a('node.rect', [0, 0, 24.12698*_ratio.ratioX, 20.63269*_ratio.ratioY]);
- Lib_123Node10.a('node.background', 'rgba(255,255,255,0.003921569)');
- Lib_123Node10.a('node.gradientcolor', '');
- Lib_123Node10.a('node.gradient', '');
- Lib_123Node10.a('node.borderwidth', Lib_123Node10BorderWidth);
- Lib_123Node10.a('node.color', 'rgba(255,0,255,1)');
- Lib_123Node10.a('node.fillrect', [0,0,0,0]);
- Lib_123Node10.a('node.fillbackcolor', 'rgba(0,0,0,0)');
- Lib_123Node10.a('node.fillgradientcolor', 'rgba(0,0,0,0)');
- Lib_123Node10.a('node.fillgradient', '');
- if (Lib_123Node10type !== 'rect') {
- Lib_123Node10.a('node.arcFrom', parseFloat('@arcFrom@'));
- Lib_123Node10.a('node.arcTo', parseFloat('@arcTo@'));
- Lib_123Node10.a('node.arcClose', '@arcClose@' === 'true' ? true : false);
- }
- if (Lib_123Node10type === 'arc') {
- Lib_123Node10.a('node.arcOval', true);
- }
- Lib_123Node10.setRotation(0*Math.PI/180);
- Lib_123Node10.borderWidth = Lib_123Node10BorderWidth;
- Lib_123Node10.borderFillwidth = Lib_123Node10BorderWidth;
- dataModel.add(Lib_123Node10);
- Lib_123Node10._nodename = 'Lib_123Node10'
- Lib_123Node10._nodeType = 'rect';
- zoomNodeList.push({
- node: Lib_123Node10,
- attr: 'node.borderwidth'
- });
- (function (node, _img) {
- var setWidth = node.setWidth,
- setHeight = node.setHeight;
- node.setWidth = function (width) {
- if (width === this.getWidth()) return ;
- var height = this.getHeight();
- this.a('node.width', width);
- this.a('node.rect', [0,0,width, height]);
- setWidth.apply(this, arguments);
- }
- node.setHeight = function (height) {
- if (height === this.getHeight()) return ;
- var width = this.getWidth();
- this.a('node.height', height);
- this.a('node.rect', [0,0,width, height]);
- setHeight.apply(this, arguments);
- }
- })(Lib_123Node10, Lib_123Node10.getImage());var Lib_123Node11rect=ht.Default.unionPoint([{x: 5, y: 22},{x: 5, y: 22},{x: 14, y: 22},{x: 10, y: 32}]),
- Lib_123Node11points=[5,22,5,22,14,22,10,32],
- Lib_123Node11compsPoints=[],
- Lib_123Node11SetPoints = [{x: 5, y: 22},{x: 5, y: 22},{x: 14, y: 22},{x: 10, y: 32}],
- Lib_123Node11setSegments = [1,2,2,2];
- _ratio = GD.getRatioWithRotation(1.570796, ratio);
- for(var i=0;i<Lib_123Node11points.length;i++){
- if(i%2==0){
- Lib_123Node11compsPoints.push(Lib_123Node11points[i]-Lib_123Node11rect.x);
- }else{
- Lib_123Node11compsPoints.push(Lib_123Node11points[i]-Lib_123Node11rect.y);
- }
- }
- var Lib_123Node11 = new ht.Node();
- Lib_123Node11.setImage(GD.getPolyGonJSON());
- Lib_123Node11.setPosition(Lib_123Node11rect.x + Lib_123Node11rect.width/2, Lib_123Node11rect.y + Lib_123Node11rect.height/2);
- Lib_123Node11.setSize(Lib_123Node11rect.width, Lib_123Node11rect.height);
- Lib_123Node11.setRotation(1.570796);
- Lib_123Node11.borderWidth=2;
- Lib_123Node11.borderFillwidth=2*2;
- Lib_123Node11.s({'pixelPerfect':true});
- dataModel.add(Lib_123Node11);
- // Lib_123Node11.a('node.width', Lib_123Node11rect.width*_ratio.ratioX);
- // Lib_123Node11.a('node.height', Lib_123Node11rect.height*_ratio.ratioY);
- Lib_123Node11.a('node.clip', function(g,width,height,data) {
- var clippoints = Lib_123Node11SetPoints;
- if(clippoints.length<=3) return;
- if(Lib_123Node11.a('Lib_123Node11.isFill')=="false") return;
- var clipcompsPoints=[];
- var rect = ht.Default.unionPoint(clippoints);
- for(var i=0;i<clippoints.length;i++){
- clipcompsPoints.push({x:clippoints[i].x-rect.x,y:clippoints[i].y-rect.y});
- }
- var clipsegments=Lib_123Node11setSegments;
- g.beginPath();
- drawPoints(g,clipcompsPoints,clipsegments);
- g.clip();
- })
- Lib_123Node11.a('node.type', 'shape');
- Lib_123Node11.a('node.comsPoints', Lib_123Node11compsPoints);
- Lib_123Node11.a('node.closePath', true);
- Lib_123Node11.a('node.borderwidth', 2);
- Lib_123Node11.a('node.color', 'rgba(255,0,255,1)');
- Lib_123Node11.a('node.background','rgba(255,255,255,0.003921569)');
- Lib_123Node11.a('node.closePath', true);
- Lib_123Node11.a('node.closePath', true);
- Lib_123Node11.a('node.gradient','');
- Lib_123Node11.a('node.gradientcolor','');
- Lib_123Node11.a('node.isFill','false');
- Lib_123Node11.a('node.original',[0,0,0,0]);
- Lib_123Node11.a('node.fillrect',[0,0,0,0]);
- Lib_123Node11.a('node.fillbackcolor','rgba(255,255,255,0.003921569)');
- Lib_123Node11.a('node.fillgradient','');
- Lib_123Node11.a('node.fillgradientcolor','');
- Lib_123Node11.a('node.segments',Lib_123Node11setSegments);
- Lib_123Node11.a('node.borderPattern',"");
- (function (node, nodecompsPoints, setPoints) {
- var w = node.getWidth()*_ratio.ratioX,
- h = node.getHeight()*_ratio.ratioY,
- img = node.getImage();
- function resetPoints(rx, ry) {
- for (var i = 0, len = nodecompsPoints.length; i < len; i++) {
- if (i%2 === 0) {
- nodecompsPoints[i]*=rx;
- } else {
- nodecompsPoints[i]*=ry;
- }
- if (setPoints[i]) {
- setPoints[i].x *= rx;
- setPoints[i].y *= ry;
- }
- }
- }
- node.setSize(w, h);
- node.a('node.width', w);
- node.a('node.height', h);
- resetPoints(_ratio.ratioX, _ratio.ratioY);
- var position = node.getPosition();
- node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
- node._nodename = 'Lib_123Node11';
- node._nodeType = 'polygon';
- zoomNodeList.push({
- node: node,
- attr: 'node.borderwidth'
- });
- // 重载setWidth, setHeight
- var setWidth = node.setWidth,
- setHeight = node.setHeight,
- timer, rx = 1, ry = 1;
- node.setWidth = function (width) {
- var _width = this.getWidth();
- rx = width / _width;
- node.a('node.width', width);
- setWidth.apply(this, arguments);
- resetPoints(rx, 1);
- }
- node.setHeight = function (height) {
- var _height = this.getHeight();
- ry = height / _height;
- node.a('node.height', height);
- setHeight.apply(this, arguments);
- resetPoints(1, ry);
- }
- })(Lib_123Node11, Lib_123Node11compsPoints, Lib_123Node11SetPoints );
- var Lib_123Node12points=[30, 13,30, 19],
- Lib_123Node12rect=ht.Default.unionPoint([{x:30,y:13},{x:30,y:19}]),
- Lib_123Node12compspts=[];
- _ratio = GD.getRatioWithRotation(0, ratio);
- var _startratio = GD.getRatioWithRotation(4.71238898038469, ratio),
- _endratio = GD.getRatioWithRotation(7.85398163397448, ratio);
- for(var i=0;i<Lib_123Node12points.length;i++){
- if(i%2==0){
- Lib_123Node12compspts.push(Lib_123Node12points[i]-Lib_123Node12rect.x);
- }else{
- Lib_123Node12compspts.push(Lib_123Node12points[i]-Lib_123Node12rect.y);
- }
- }
- var Lib_123Node12ptslength=Lib_123Node12compspts.length;
- if (Lib_123Node12rect.height === 0) {
- Lib_123Node12compspts[0] -= 0;
- Lib_123Node12compspts[Lib_123Node12ptslength-2] += 0;
- } else if (Lib_123Node12rect.width === 0){
- Lib_123Node12compspts[1] -= 0;
- Lib_123Node12compspts[Lib_123Node12ptslength-1] += 0;
- } else {
- Lib_123Node12compspts[0] -= 0;
- Lib_123Node12compspts[1] -= 0;
- Lib_123Node12compspts[Lib_123Node12ptslength-2] += 0;
- Lib_123Node12compspts[Lib_123Node12ptslength-1] += 0;
- }
- Lib_123Node12 = new ht.Node();
- Lib_123Node12.borderWidth = 2;
- Lib_123Node12rect.width = Lib_123Node12rect.width === 0 ? 0.0001 : Lib_123Node12rect.width;
- Lib_123Node12rect.height = Lib_123Node12rect.height === 0 ? 0.0001 : Lib_123Node12rect.height;
- var Lib_123Node12endCompspts = [Lib_123Node12compspts[Lib_123Node12ptslength-2],Lib_123Node12compspts[Lib_123Node12ptslength-1],0,0];
- var Lib_123Node12startCompspts = [Lib_123Node12compspts[0],Lib_123Node12compspts[1],0,0];
- Lib_123Node12.setImage(GD.getPolyLineJSON());
- Lib_123Node12.setPosition(Lib_123Node12rect.x+Lib_123Node12rect.width/2,Lib_123Node12rect.y+Lib_123Node12rect.height/2);
- Lib_123Node12.setSize(Lib_123Node12rect.width,Lib_123Node12rect.height);
- Lib_123Node12.setStyle("opacity",1);
- Lib_123Node12.s({'pixelPerfect':true});
- Lib_123Node12borderwidth=2;
- Lib_123Node12.setRotation(0);
- dataModel.add(Lib_123Node12);
- Lib_123Node12.a('node.points',Lib_123Node12compspts);
- Lib_123Node12.a('node.segments',[1,2]);
- Lib_123Node12.a('node.color','rgba(255,0,255,1)');
- Lib_123Node12.a('node.borderPattern',getDashStyle("@borderPattern@"));
- Lib_123Node12.a('node.borderColor','rgba(255,0,255,1)');
- Lib_123Node12.a('node.background','rgba(255,0,255,1)');
- Lib_123Node12.a('node.gradient','');
- Lib_123Node12.a('node.gradientcolor','rgba(255,0,255,1)');
- Lib_123Node12.a('node.endCompspts',Lib_123Node12endCompspts);
- Lib_123Node12.a('node.startCompspts',Lib_123Node12startCompspts);
- (function (node, img, compspts, endCompspts, startCompspts) {
- var position = node.getPosition(),
- w = node.getWidth()*_ratio.ratioX,
- h = node.getHeight()*_ratio.ratioY;
- function resetPoints(rx, ry) {
- for (var i = 0, len = compspts.length; i < len; i++) {
- if (i%2 === 0) {
- compspts[i]*=rx;
- } else {
- compspts[i]*=ry;
- }
- }
- endCompspts[0] = compspts[compspts.length-2];
- endCompspts[1] = compspts[compspts.length-1];
- endCompspts[2] *= rx;
- endCompspts[3] *= ry;
- node.a('node.offsetEndY', -(endCompspts[3]*0.5));
- node.a('node.offsetEndX', -(endCompspts[2]*0.5));
-
- startCompspts[0] = compspts[0];
- startCompspts[1] = compspts[1];
- startCompspts[2] *= rx;
- startCompspts[3] *= ry;
- node.a('node.offsetStartY', -(startCompspts[3]*0.5));
- node.a('node.offsetStartX', -(startCompspts[2]*0.5));
- node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
- node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
- }
- node.setSize(w, h);
- node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
- node.a('node.width', w);
- node.a('node.height', h);
- resetPoints(_ratio.ratioX, _ratio.ratioY);
- node.borderWidth = 2;
- node.a('node.borderwidth',node.borderWidth);
- node._nodename = 'Lib_123Node12';
- node._nodeType = 'line';
- zoomNodeList.push({
- node: node,
- attr: 'node.borderwidth'
- });
- var setWidth = node.setWidth,
- setHeight = node.setHeight,
- timer, rx = 1, ry = 1;
-
- node.setWidth = function (width) {
- var _width = this.getWidth();
- rx = width / _width;
- node.a('node.width', width);
- setWidth.apply(this, arguments);
- resetPoints(rx, 1);
- }
- node.setHeight = function (height) {
- var _height = this.getHeight();
- ry = height / _height;
- node.a('node.height', height);
- setHeight.apply(this, arguments);
- resetPoints(1, ry);
- }
- })(Lib_123Node12, Lib_123Node12.getImage(), Lib_123Node12compspts, Lib_123Node12endCompspts, Lib_123Node12startCompspts);
- var Lib_123Node13points=[30, 19,36, 23],
- Lib_123Node13rect=ht.Default.unionPoint([{x:30,y:19},{x:36,y:23}]),
- Lib_123Node13compspts=[];
- _ratio = GD.getRatioWithRotation(0, ratio);
- var _startratio = GD.getRatioWithRotation(3.72959527089228, ratio),
- _endratio = GD.getRatioWithRotation(0.588002617302485, ratio);
- for(var i=0;i<Lib_123Node13points.length;i++){
- if(i%2==0){
- Lib_123Node13compspts.push(Lib_123Node13points[i]-Lib_123Node13rect.x);
- }else{
- Lib_123Node13compspts.push(Lib_123Node13points[i]-Lib_123Node13rect.y);
- }
- }
- var Lib_123Node13ptslength=Lib_123Node13compspts.length;
- if (Lib_123Node13rect.height === 0) {
- Lib_123Node13compspts[0] -= 0;
- Lib_123Node13compspts[Lib_123Node13ptslength-2] += 0;
- } else if (Lib_123Node13rect.width === 0){
- Lib_123Node13compspts[1] -= 0;
- Lib_123Node13compspts[Lib_123Node13ptslength-1] += 0;
- } else {
- Lib_123Node13compspts[0] -= 0;
- Lib_123Node13compspts[1] -= 0;
- Lib_123Node13compspts[Lib_123Node13ptslength-2] += 0;
- Lib_123Node13compspts[Lib_123Node13ptslength-1] += 0;
- }
- Lib_123Node13 = new ht.Node();
- Lib_123Node13.borderWidth = 2;
- Lib_123Node13rect.width = Lib_123Node13rect.width === 0 ? 0.0001 : Lib_123Node13rect.width;
- Lib_123Node13rect.height = Lib_123Node13rect.height === 0 ? 0.0001 : Lib_123Node13rect.height;
- var Lib_123Node13endCompspts = [Lib_123Node13compspts[Lib_123Node13ptslength-2],Lib_123Node13compspts[Lib_123Node13ptslength-1],0,0];
- var Lib_123Node13startCompspts = [Lib_123Node13compspts[0],Lib_123Node13compspts[1],0,0];
- Lib_123Node13.setImage(GD.getPolyLineJSON());
- Lib_123Node13.setPosition(Lib_123Node13rect.x+Lib_123Node13rect.width/2,Lib_123Node13rect.y+Lib_123Node13rect.height/2);
- Lib_123Node13.setSize(Lib_123Node13rect.width,Lib_123Node13rect.height);
- Lib_123Node13.setStyle("opacity",1);
- Lib_123Node13.s({'pixelPerfect':true});
- Lib_123Node13borderwidth=2;
- Lib_123Node13.setRotation(0);
- dataModel.add(Lib_123Node13);
- Lib_123Node13.a('node.points',Lib_123Node13compspts);
- Lib_123Node13.a('node.segments',[1,2]);
- Lib_123Node13.a('node.color','rgba(255,0,255,1)');
- Lib_123Node13.a('node.borderPattern',getDashStyle("@borderPattern@"));
- Lib_123Node13.a('node.borderColor','rgba(255,0,255,1)');
- Lib_123Node13.a('node.background','rgba(255,0,255,1)');
- Lib_123Node13.a('node.gradient','');
- Lib_123Node13.a('node.gradientcolor','rgba(255,0,255,1)');
- Lib_123Node13.a('node.endCompspts',Lib_123Node13endCompspts);
- Lib_123Node13.a('node.startCompspts',Lib_123Node13startCompspts);
- (function (node, img, compspts, endCompspts, startCompspts) {
- var position = node.getPosition(),
- w = node.getWidth()*_ratio.ratioX,
- h = node.getHeight()*_ratio.ratioY;
- function resetPoints(rx, ry) {
- for (var i = 0, len = compspts.length; i < len; i++) {
- if (i%2 === 0) {
- compspts[i]*=rx;
- } else {
- compspts[i]*=ry;
- }
- }
- endCompspts[0] = compspts[compspts.length-2];
- endCompspts[1] = compspts[compspts.length-1];
- endCompspts[2] *= rx;
- endCompspts[3] *= ry;
- node.a('node.offsetEndY', -(endCompspts[3]*0.5));
- node.a('node.offsetEndX', -(endCompspts[2]*0.5));
-
- startCompspts[0] = compspts[0];
- startCompspts[1] = compspts[1];
- startCompspts[2] *= rx;
- startCompspts[3] *= ry;
- node.a('node.offsetStartY', -(startCompspts[3]*0.5));
- node.a('node.offsetStartX', -(startCompspts[2]*0.5));
- node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
- node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
- }
- node.setSize(w, h);
- node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
- node.a('node.width', w);
- node.a('node.height', h);
- resetPoints(_ratio.ratioX, _ratio.ratioY);
- node.borderWidth = 2;
- node.a('node.borderwidth',node.borderWidth);
- node._nodename = 'Lib_123Node13';
- node._nodeType = 'line';
- zoomNodeList.push({
- node: node,
- attr: 'node.borderwidth'
- });
- var setWidth = node.setWidth,
- setHeight = node.setHeight,
- timer, rx = 1, ry = 1;
-
- node.setWidth = function (width) {
- var _width = this.getWidth();
- rx = width / _width;
- node.a('node.width', width);
- setWidth.apply(this, arguments);
- resetPoints(rx, 1);
- }
- node.setHeight = function (height) {
- var _height = this.getHeight();
- ry = height / _height;
- node.a('node.height', height);
- setHeight.apply(this, arguments);
- resetPoints(1, ry);
- }
- })(Lib_123Node13, Lib_123Node13.getImage(), Lib_123Node13compspts, Lib_123Node13endCompspts, Lib_123Node13startCompspts);
- var Lib_123Node14points=[30, 19,24, 23],
- Lib_123Node14rect=ht.Default.unionPoint([{x:30,y:19},{x:24,y:23}]),
- Lib_123Node14compspts=[];
- _ratio = GD.getRatioWithRotation(0, ratio);
- var _startratio = GD.getRatioWithRotation(-0.588002617302485, ratio),
- _endratio = GD.getRatioWithRotation(2.55359003628731, ratio);
- for(var i=0;i<Lib_123Node14points.length;i++){
- if(i%2==0){
- Lib_123Node14compspts.push(Lib_123Node14points[i]-Lib_123Node14rect.x);
- }else{
- Lib_123Node14compspts.push(Lib_123Node14points[i]-Lib_123Node14rect.y);
- }
- }
- var Lib_123Node14ptslength=Lib_123Node14compspts.length;
- if (Lib_123Node14rect.height === 0) {
- Lib_123Node14compspts[0] -= 0;
- Lib_123Node14compspts[Lib_123Node14ptslength-2] += 0;
- } else if (Lib_123Node14rect.width === 0){
- Lib_123Node14compspts[1] -= 0;
- Lib_123Node14compspts[Lib_123Node14ptslength-1] += 0;
- } else {
- Lib_123Node14compspts[0] -= 0;
- Lib_123Node14compspts[1] -= 0;
- Lib_123Node14compspts[Lib_123Node14ptslength-2] += 0;
- Lib_123Node14compspts[Lib_123Node14ptslength-1] += 0;
- }
- Lib_123Node14 = new ht.Node();
- Lib_123Node14.borderWidth = 2;
- Lib_123Node14rect.width = Lib_123Node14rect.width === 0 ? 0.0001 : Lib_123Node14rect.width;
- Lib_123Node14rect.height = Lib_123Node14rect.height === 0 ? 0.0001 : Lib_123Node14rect.height;
- var Lib_123Node14endCompspts = [Lib_123Node14compspts[Lib_123Node14ptslength-2],Lib_123Node14compspts[Lib_123Node14ptslength-1],0,0];
- var Lib_123Node14startCompspts = [Lib_123Node14compspts[0],Lib_123Node14compspts[1],0,0];
- Lib_123Node14.setImage(GD.getPolyLineJSON());
- Lib_123Node14.setPosition(Lib_123Node14rect.x+Lib_123Node14rect.width/2,Lib_123Node14rect.y+Lib_123Node14rect.height/2);
- Lib_123Node14.setSize(Lib_123Node14rect.width,Lib_123Node14rect.height);
- Lib_123Node14.setStyle("opacity",1);
- Lib_123Node14.s({'pixelPerfect':true});
- Lib_123Node14borderwidth=2;
- Lib_123Node14.setRotation(0);
- dataModel.add(Lib_123Node14);
- Lib_123Node14.a('node.points',Lib_123Node14compspts);
- Lib_123Node14.a('node.segments',[1,2]);
- Lib_123Node14.a('node.color','rgba(255,0,255,1)');
- Lib_123Node14.a('node.borderPattern',getDashStyle("@borderPattern@"));
- Lib_123Node14.a('node.borderColor','rgba(255,0,255,1)');
- Lib_123Node14.a('node.background','rgba(255,0,255,1)');
- Lib_123Node14.a('node.gradient','');
- Lib_123Node14.a('node.gradientcolor','rgba(255,0,255,1)');
- Lib_123Node14.a('node.endCompspts',Lib_123Node14endCompspts);
- Lib_123Node14.a('node.startCompspts',Lib_123Node14startCompspts);
- (function (node, img, compspts, endCompspts, startCompspts) {
- var position = node.getPosition(),
- w = node.getWidth()*_ratio.ratioX,
- h = node.getHeight()*_ratio.ratioY;
- function resetPoints(rx, ry) {
- for (var i = 0, len = compspts.length; i < len; i++) {
- if (i%2 === 0) {
- compspts[i]*=rx;
- } else {
- compspts[i]*=ry;
- }
- }
- endCompspts[0] = compspts[compspts.length-2];
- endCompspts[1] = compspts[compspts.length-1];
- endCompspts[2] *= rx;
- endCompspts[3] *= ry;
- node.a('node.offsetEndY', -(endCompspts[3]*0.5));
- node.a('node.offsetEndX', -(endCompspts[2]*0.5));
-
- startCompspts[0] = compspts[0];
- startCompspts[1] = compspts[1];
- startCompspts[2] *= rx;
- startCompspts[3] *= ry;
- node.a('node.offsetStartY', -(startCompspts[3]*0.5));
- node.a('node.offsetStartX', -(startCompspts[2]*0.5));
- node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
- node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
- }
- node.setSize(w, h);
- node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
- node.a('node.width', w);
- node.a('node.height', h);
- resetPoints(_ratio.ratioX, _ratio.ratioY);
- node.borderWidth = 2;
- node.a('node.borderwidth',node.borderWidth);
- node._nodename = 'Lib_123Node14';
- node._nodeType = 'line';
- zoomNodeList.push({
- node: node,
- attr: 'node.borderwidth'
- });
- var setWidth = node.setWidth,
- setHeight = node.setHeight,
- timer, rx = 1, ry = 1;
-
- node.setWidth = function (width) {
- var _width = this.getWidth();
- rx = width / _width;
- node.a('node.width', width);
- setWidth.apply(this, arguments);
- resetPoints(rx, 1);
- }
- node.setHeight = function (height) {
- var _height = this.getHeight();
- ry = height / _height;
- node.a('node.height', height);
- setHeight.apply(this, arguments);
- resetPoints(1, ry);
- }
- })(Lib_123Node14, Lib_123Node14.getImage(), Lib_123Node14compspts, Lib_123Node14endCompspts, Lib_123Node14startCompspts);
- _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
- var Lib_123Node15type = 'oval';
- var Lib_123Node15 = new ht.Node(),
- Lib_123Node15BorderWidth = 2*2;
- if (Lib_123Node15type === 'arc') {
- Lib_123Node15BorderWidth *= 2;
- }
- Lib_123Node15.setImage(GD.getRectJSON(24.12697*_ratio.ratioX, 20.63269*_ratio.ratioY, Lib_123Node15type, '@arcFrom@', '@arcTo@', '@arcClose@'));
- Lib_123Node15.setPosition(29*ratio.ratioX, 35*ratio.ratioY);
- Lib_123Node15.setSize(24.12697*_ratio.ratioX, 20.63269*_ratio.ratioY);
- Lib_123Node15.s({
- 'pixelPerfect':true
- /*@AddPara@*/
- });
- Lib_123Node15.a('node.width', 24.12697*_ratio.ratioX);
- Lib_123Node15.a('node.height', 20.63269*_ratio.ratioY);
- Lib_123Node15.a('node.type', Lib_123Node15type);
- Lib_123Node15.a('node.rect', [0, 0, 24.12697*_ratio.ratioX, 20.63269*_ratio.ratioY]);
- Lib_123Node15.a('node.background', 'rgba(255,255,255,0.003921569)');
- Lib_123Node15.a('node.gradientcolor', '');
- Lib_123Node15.a('node.gradient', '');
- Lib_123Node15.a('node.borderwidth', Lib_123Node15BorderWidth);
- Lib_123Node15.a('node.color', 'rgba(255,0,255,1)');
- Lib_123Node15.a('node.fillrect', [0,0,0,0]);
- Lib_123Node15.a('node.fillbackcolor', 'rgba(0,0,0,0)');
- Lib_123Node15.a('node.fillgradientcolor', 'rgba(0,0,0,0)');
- Lib_123Node15.a('node.fillgradient', '');
- if (Lib_123Node15type !== 'rect') {
- Lib_123Node15.a('node.arcFrom', parseFloat('@arcFrom@'));
- Lib_123Node15.a('node.arcTo', parseFloat('@arcTo@'));
- Lib_123Node15.a('node.arcClose', '@arcClose@' === 'true' ? true : false);
- }
- if (Lib_123Node15type === 'arc') {
- Lib_123Node15.a('node.arcOval', true);
- }
- Lib_123Node15.setRotation(0*Math.PI/180);
- Lib_123Node15.borderWidth = Lib_123Node15BorderWidth;
- Lib_123Node15.borderFillwidth = Lib_123Node15BorderWidth;
- dataModel.add(Lib_123Node15);
- Lib_123Node15._nodename = 'Lib_123Node15'
- Lib_123Node15._nodeType = 'rect';
- zoomNodeList.push({
- node: Lib_123Node15,
- attr: 'node.borderwidth'
- });
- (function (node, _img) {
- var setWidth = node.setWidth,
- setHeight = node.setHeight;
- node.setWidth = function (width) {
- if (width === this.getWidth()) return ;
- var height = this.getHeight();
- this.a('node.width', width);
- this.a('node.rect', [0,0,width, height]);
- setWidth.apply(this, arguments);
- }
- node.setHeight = function (height) {
- if (height === this.getHeight()) return ;
- var width = this.getWidth();
- this.a('node.height', height);
- this.a('node.rect', [0,0,width, height]);
- setHeight.apply(this, arguments);
- }
- })(Lib_123Node15, Lib_123Node15.getImage());var Lib_123Node16points=[29, 29,29, 35],
- Lib_123Node16rect=ht.Default.unionPoint([{x:29,y:29},{x:29,y:35}]),
- Lib_123Node16compspts=[];
- _ratio = GD.getRatioWithRotation(0, ratio);
- var _startratio = GD.getRatioWithRotation(4.71238898038469, ratio),
- _endratio = GD.getRatioWithRotation(7.85398163397448, ratio);
- for(var i=0;i<Lib_123Node16points.length;i++){
- if(i%2==0){
- Lib_123Node16compspts.push(Lib_123Node16points[i]-Lib_123Node16rect.x);
- }else{
- Lib_123Node16compspts.push(Lib_123Node16points[i]-Lib_123Node16rect.y);
- }
- }
- var Lib_123Node16ptslength=Lib_123Node16compspts.length;
- if (Lib_123Node16rect.height === 0) {
- Lib_123Node16compspts[0] -= 0;
- Lib_123Node16compspts[Lib_123Node16ptslength-2] += 0;
- } else if (Lib_123Node16rect.width === 0){
- Lib_123Node16compspts[1] -= 0;
- Lib_123Node16compspts[Lib_123Node16ptslength-1] += 0;
- } else {
- Lib_123Node16compspts[0] -= 0;
- Lib_123Node16compspts[1] -= 0;
- Lib_123Node16compspts[Lib_123Node16ptslength-2] += 0;
- Lib_123Node16compspts[Lib_123Node16ptslength-1] += 0;
- }
- Lib_123Node16 = new ht.Node();
- Lib_123Node16.borderWidth = 2;
- Lib_123Node16rect.width = Lib_123Node16rect.width === 0 ? 0.0001 : Lib_123Node16rect.width;
- Lib_123Node16rect.height = Lib_123Node16rect.height === 0 ? 0.0001 : Lib_123Node16rect.height;
- var Lib_123Node16endCompspts = [Lib_123Node16compspts[Lib_123Node16ptslength-2],Lib_123Node16compspts[Lib_123Node16ptslength-1],0,0];
- var Lib_123Node16startCompspts = [Lib_123Node16compspts[0],Lib_123Node16compspts[1],0,0];
- Lib_123Node16.setImage(GD.getPolyLineJSON());
- Lib_123Node16.setPosition(Lib_123Node16rect.x+Lib_123Node16rect.width/2,Lib_123Node16rect.y+Lib_123Node16rect.height/2);
- Lib_123Node16.setSize(Lib_123Node16rect.width,Lib_123Node16rect.height);
- Lib_123Node16.setStyle("opacity",1);
- Lib_123Node16.s({'pixelPerfect':true});
- Lib_123Node16borderwidth=2;
- Lib_123Node16.setRotation(0);
- dataModel.add(Lib_123Node16);
- Lib_123Node16.a('node.points',Lib_123Node16compspts);
- Lib_123Node16.a('node.segments',[1,2]);
- Lib_123Node16.a('node.color','rgba(255,0,255,1)');
- Lib_123Node16.a('node.borderPattern',getDashStyle("@borderPattern@"));
- Lib_123Node16.a('node.borderColor','rgba(255,0,255,1)');
- Lib_123Node16.a('node.background','rgba(255,0,255,1)');
- Lib_123Node16.a('node.gradient','');
- Lib_123Node16.a('node.gradientcolor','rgba(255,0,255,1)');
- Lib_123Node16.a('node.endCompspts',Lib_123Node16endCompspts);
- Lib_123Node16.a('node.startCompspts',Lib_123Node16startCompspts);
- (function (node, img, compspts, endCompspts, startCompspts) {
- var position = node.getPosition(),
- w = node.getWidth()*_ratio.ratioX,
- h = node.getHeight()*_ratio.ratioY;
- function resetPoints(rx, ry) {
- for (var i = 0, len = compspts.length; i < len; i++) {
- if (i%2 === 0) {
- compspts[i]*=rx;
- } else {
- compspts[i]*=ry;
- }
- }
- endCompspts[0] = compspts[compspts.length-2];
- endCompspts[1] = compspts[compspts.length-1];
- endCompspts[2] *= rx;
- endCompspts[3] *= ry;
- node.a('node.offsetEndY', -(endCompspts[3]*0.5));
- node.a('node.offsetEndX', -(endCompspts[2]*0.5));
-
- startCompspts[0] = compspts[0];
- startCompspts[1] = compspts[1];
- startCompspts[2] *= rx;
- startCompspts[3] *= ry;
- node.a('node.offsetStartY', -(startCompspts[3]*0.5));
- node.a('node.offsetStartX', -(startCompspts[2]*0.5));
- node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
- node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
- }
- node.setSize(w, h);
- node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
- node.a('node.width', w);
- node.a('node.height', h);
- resetPoints(_ratio.ratioX, _ratio.ratioY);
- node.borderWidth = 2;
- node.a('node.borderwidth',node.borderWidth);
- node._nodename = 'Lib_123Node16';
- node._nodeType = 'line';
- zoomNodeList.push({
- node: node,
- attr: 'node.borderwidth'
- });
- var setWidth = node.setWidth,
- setHeight = node.setHeight,
- timer, rx = 1, ry = 1;
-
- node.setWidth = function (width) {
- var _width = this.getWidth();
- rx = width / _width;
- node.a('node.width', width);
- setWidth.apply(this, arguments);
- resetPoints(rx, 1);
- }
- node.setHeight = function (height) {
- var _height = this.getHeight();
- ry = height / _height;
- node.a('node.height', height);
- setHeight.apply(this, arguments);
- resetPoints(1, ry);
- }
- })(Lib_123Node16, Lib_123Node16.getImage(), Lib_123Node16compspts, Lib_123Node16endCompspts, Lib_123Node16startCompspts);
- var Lib_123Node17points=[29, 35,35, 40],
- Lib_123Node17rect=ht.Default.unionPoint([{x:29,y:35},{x:35,y:40}]),
- Lib_123Node17compspts=[];
- _ratio = GD.getRatioWithRotation(0, ratio);
- var _startratio = GD.getRatioWithRotation(3.83633091806099, ratio),
- _endratio = GD.getRatioWithRotation(0.694738264471199, ratio);
- for(var i=0;i<Lib_123Node17points.length;i++){
- if(i%2==0){
- Lib_123Node17compspts.push(Lib_123Node17points[i]-Lib_123Node17rect.x);
- }else{
- Lib_123Node17compspts.push(Lib_123Node17points[i]-Lib_123Node17rect.y);
- }
- }
- var Lib_123Node17ptslength=Lib_123Node17compspts.length;
- if (Lib_123Node17rect.height === 0) {
- Lib_123Node17compspts[0] -= 0;
- Lib_123Node17compspts[Lib_123Node17ptslength-2] += 0;
- } else if (Lib_123Node17rect.width === 0){
- Lib_123Node17compspts[1] -= 0;
- Lib_123Node17compspts[Lib_123Node17ptslength-1] += 0;
- } else {
- Lib_123Node17compspts[0] -= 0;
- Lib_123Node17compspts[1] -= 0;
- Lib_123Node17compspts[Lib_123Node17ptslength-2] += 0;
- Lib_123Node17compspts[Lib_123Node17ptslength-1] += 0;
- }
- Lib_123Node17 = new ht.Node();
- Lib_123Node17.borderWidth = 2;
- Lib_123Node17rect.width = Lib_123Node17rect.width === 0 ? 0.0001 : Lib_123Node17rect.width;
- Lib_123Node17rect.height = Lib_123Node17rect.height === 0 ? 0.0001 : Lib_123Node17rect.height;
- var Lib_123Node17endCompspts = [Lib_123Node17compspts[Lib_123Node17ptslength-2],Lib_123Node17compspts[Lib_123Node17ptslength-1],0,0];
- var Lib_123Node17startCompspts = [Lib_123Node17compspts[0],Lib_123Node17compspts[1],0,0];
- Lib_123Node17.setImage(GD.getPolyLineJSON());
- Lib_123Node17.setPosition(Lib_123Node17rect.x+Lib_123Node17rect.width/2,Lib_123Node17rect.y+Lib_123Node17rect.height/2);
- Lib_123Node17.setSize(Lib_123Node17rect.width,Lib_123Node17rect.height);
- Lib_123Node17.setStyle("opacity",1);
- Lib_123Node17.s({'pixelPerfect':true});
- Lib_123Node17borderwidth=2;
- Lib_123Node17.setRotation(0);
- dataModel.add(Lib_123Node17);
- Lib_123Node17.a('node.points',Lib_123Node17compspts);
- Lib_123Node17.a('node.segments',[1,2]);
- Lib_123Node17.a('node.color','rgba(255,0,255,1)');
- Lib_123Node17.a('node.borderPattern',getDashStyle("@borderPattern@"));
- Lib_123Node17.a('node.borderColor','rgba(255,0,255,1)');
- Lib_123Node17.a('node.background','rgba(255,0,255,1)');
- Lib_123Node17.a('node.gradient','');
- Lib_123Node17.a('node.gradientcolor','rgba(255,0,255,1)');
- Lib_123Node17.a('node.endCompspts',Lib_123Node17endCompspts);
- Lib_123Node17.a('node.startCompspts',Lib_123Node17startCompspts);
- (function (node, img, compspts, endCompspts, startCompspts) {
- var position = node.getPosition(),
- w = node.getWidth()*_ratio.ratioX,
- h = node.getHeight()*_ratio.ratioY;
- function resetPoints(rx, ry) {
- for (var i = 0, len = compspts.length; i < len; i++) {
- if (i%2 === 0) {
- compspts[i]*=rx;
- } else {
- compspts[i]*=ry;
- }
- }
- endCompspts[0] = compspts[compspts.length-2];
- endCompspts[1] = compspts[compspts.length-1];
- endCompspts[2] *= rx;
- endCompspts[3] *= ry;
- node.a('node.offsetEndY', -(endCompspts[3]*0.5));
- node.a('node.offsetEndX', -(endCompspts[2]*0.5));
-
- startCompspts[0] = compspts[0];
- startCompspts[1] = compspts[1];
- startCompspts[2] *= rx;
- startCompspts[3] *= ry;
- node.a('node.offsetStartY', -(startCompspts[3]*0.5));
- node.a('node.offsetStartX', -(startCompspts[2]*0.5));
- node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
- node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
- }
- node.setSize(w, h);
- node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
- node.a('node.width', w);
- node.a('node.height', h);
- resetPoints(_ratio.ratioX, _ratio.ratioY);
- node.borderWidth = 2;
- node.a('node.borderwidth',node.borderWidth);
- node._nodename = 'Lib_123Node17';
- node._nodeType = 'line';
- zoomNodeList.push({
- node: node,
- attr: 'node.borderwidth'
- });
- var setWidth = node.setWidth,
- setHeight = node.setHeight,
- timer, rx = 1, ry = 1;
-
- node.setWidth = function (width) {
- var _width = this.getWidth();
- rx = width / _width;
- node.a('node.width', width);
- setWidth.apply(this, arguments);
- resetPoints(rx, 1);
- }
- node.setHeight = function (height) {
- var _height = this.getHeight();
- ry = height / _height;
- node.a('node.height', height);
- setHeight.apply(this, arguments);
- resetPoints(1, ry);
- }
- })(Lib_123Node17, Lib_123Node17.getImage(), Lib_123Node17compspts, Lib_123Node17endCompspts, Lib_123Node17startCompspts);
- var Lib_123Node18points=[29, 35,23, 40],
- Lib_123Node18rect=ht.Default.unionPoint([{x:29,y:35},{x:23,y:40}]),
- Lib_123Node18compspts=[];
- _ratio = GD.getRatioWithRotation(0, ratio);
- var _startratio = GD.getRatioWithRotation(-0.694738264471199, ratio),
- _endratio = GD.getRatioWithRotation(2.44685438911859, ratio);
- for(var i=0;i<Lib_123Node18points.length;i++){
- if(i%2==0){
- Lib_123Node18compspts.push(Lib_123Node18points[i]-Lib_123Node18rect.x);
- }else{
- Lib_123Node18compspts.push(Lib_123Node18points[i]-Lib_123Node18rect.y);
- }
- }
- var Lib_123Node18ptslength=Lib_123Node18compspts.length;
- if (Lib_123Node18rect.height === 0) {
- Lib_123Node18compspts[0] -= 0;
- Lib_123Node18compspts[Lib_123Node18ptslength-2] += 0;
- } else if (Lib_123Node18rect.width === 0){
- Lib_123Node18compspts[1] -= 0;
- Lib_123Node18compspts[Lib_123Node18ptslength-1] += 0;
- } else {
- Lib_123Node18compspts[0] -= 0;
- Lib_123Node18compspts[1] -= 0;
- Lib_123Node18compspts[Lib_123Node18ptslength-2] += 0;
- Lib_123Node18compspts[Lib_123Node18ptslength-1] += 0;
- }
- Lib_123Node18 = new ht.Node();
- Lib_123Node18.borderWidth = 2;
- Lib_123Node18rect.width = Lib_123Node18rect.width === 0 ? 0.0001 : Lib_123Node18rect.width;
- Lib_123Node18rect.height = Lib_123Node18rect.height === 0 ? 0.0001 : Lib_123Node18rect.height;
- var Lib_123Node18endCompspts = [Lib_123Node18compspts[Lib_123Node18ptslength-2],Lib_123Node18compspts[Lib_123Node18ptslength-1],0,0];
- var Lib_123Node18startCompspts = [Lib_123Node18compspts[0],Lib_123Node18compspts[1],0,0];
- Lib_123Node18.setImage(GD.getPolyLineJSON());
- Lib_123Node18.setPosition(Lib_123Node18rect.x+Lib_123Node18rect.width/2,Lib_123Node18rect.y+Lib_123Node18rect.height/2);
- Lib_123Node18.setSize(Lib_123Node18rect.width,Lib_123Node18rect.height);
- Lib_123Node18.setStyle("opacity",1);
- Lib_123Node18.s({'pixelPerfect':true});
- Lib_123Node18borderwidth=2;
- Lib_123Node18.setRotation(0);
- dataModel.add(Lib_123Node18);
- Lib_123Node18.a('node.points',Lib_123Node18compspts);
- Lib_123Node18.a('node.segments',[1,2]);
- Lib_123Node18.a('node.color','rgba(255,0,255,1)');
- Lib_123Node18.a('node.borderPattern',getDashStyle("@borderPattern@"));
- Lib_123Node18.a('node.borderColor','rgba(255,0,255,1)');
- Lib_123Node18.a('node.background','rgba(255,0,255,1)');
- Lib_123Node18.a('node.gradient','');
- Lib_123Node18.a('node.gradientcolor','rgba(255,0,255,1)');
- Lib_123Node18.a('node.endCompspts',Lib_123Node18endCompspts);
- Lib_123Node18.a('node.startCompspts',Lib_123Node18startCompspts);
- (function (node, img, compspts, endCompspts, startCompspts) {
- var position = node.getPosition(),
- w = node.getWidth()*_ratio.ratioX,
- h = node.getHeight()*_ratio.ratioY;
- function resetPoints(rx, ry) {
- for (var i = 0, len = compspts.length; i < len; i++) {
- if (i%2 === 0) {
- compspts[i]*=rx;
- } else {
- compspts[i]*=ry;
- }
- }
- endCompspts[0] = compspts[compspts.length-2];
- endCompspts[1] = compspts[compspts.length-1];
- endCompspts[2] *= rx;
- endCompspts[3] *= ry;
- node.a('node.offsetEndY', -(endCompspts[3]*0.5));
- node.a('node.offsetEndX', -(endCompspts[2]*0.5));
-
- startCompspts[0] = compspts[0];
- startCompspts[1] = compspts[1];
- startCompspts[2] *= rx;
- startCompspts[3] *= ry;
- node.a('node.offsetStartY', -(startCompspts[3]*0.5));
- node.a('node.offsetStartX', -(startCompspts[2]*0.5));
- node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
- node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
- }
- node.setSize(w, h);
- node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
- node.a('node.width', w);
- node.a('node.height', h);
- resetPoints(_ratio.ratioX, _ratio.ratioY);
- node.borderWidth = 2;
- node.a('node.borderwidth',node.borderWidth);
- node._nodename = 'Lib_123Node18';
- node._nodeType = 'line';
- zoomNodeList.push({
- node: node,
- attr: 'node.borderwidth'
- });
- var setWidth = node.setWidth,
- setHeight = node.setHeight,
- timer, rx = 1, ry = 1;
-
- node.setWidth = function (width) {
- var _width = this.getWidth();
- rx = width / _width;
- node.a('node.width', width);
- setWidth.apply(this, arguments);
- resetPoints(rx, 1);
- }
- node.setHeight = function (height) {
- var _height = this.getHeight();
- ry = height / _height;
- node.a('node.height', height);
- setHeight.apply(this, arguments);
- resetPoints(1, ry);
- }
- })(Lib_123Node18, Lib_123Node18.getImage(), Lib_123Node18compspts, Lib_123Node18endCompspts, Lib_123Node18startCompspts);
- /*@GraphList@*/
- /*@PageInit@*/
-
- var localVarObj = this.localVarObj;
- var localDynamicVarObj = this.localDynamicVar();
- this['Lib_123Node0'] = Lib_123Node0;
- Lib_123Node0.__parentLib = nodename;
- Lib_123Node0.__parent = this;
- this.childNodes.push(Lib_123Node0);
- this['Lib_123Node1'] = Lib_123Node1;
- Lib_123Node1.__parentLib = nodename;
- Lib_123Node1.__parent = this;
- this.childNodes.push(Lib_123Node1);
- this['Lib_123Node2'] = Lib_123Node2;
- Lib_123Node2.__parentLib = nodename;
- Lib_123Node2.__parent = this;
- this.childNodes.push(Lib_123Node2);
- this['Lib_123Node3'] = Lib_123Node3;
- Lib_123Node3.__parentLib = nodename;
- Lib_123Node3.__parent = this;
- this.childNodes.push(Lib_123Node3);
- this['Lib_123Node4'] = Lib_123Node4;
- Lib_123Node4.__parentLib = nodename;
- Lib_123Node4.__parent = this;
- this.childNodes.push(Lib_123Node4);
- this['Lib_123Node5'] = Lib_123Node5;
- Lib_123Node5.__parentLib = nodename;
- Lib_123Node5.__parent = this;
- this.childNodes.push(Lib_123Node5);
- this['Lib_123Node6'] = Lib_123Node6;
- Lib_123Node6.__parentLib = nodename;
- Lib_123Node6.__parent = this;
- this.childNodes.push(Lib_123Node6);
- this['Lib_123Node7'] = Lib_123Node7;
- Lib_123Node7.__parentLib = nodename;
- Lib_123Node7.__parent = this;
- this.childNodes.push(Lib_123Node7);
- this['Lib_123Node8'] = Lib_123Node8;
- Lib_123Node8.__parentLib = nodename;
- Lib_123Node8.__parent = this;
- this.childNodes.push(Lib_123Node8);
- this['Lib_123Node9'] = Lib_123Node9;
- Lib_123Node9.__parentLib = nodename;
- Lib_123Node9.__parent = this;
- this.childNodes.push(Lib_123Node9);
- this['Lib_123Node10'] = Lib_123Node10;
- Lib_123Node10.__parentLib = nodename;
- Lib_123Node10.__parent = this;
- this.childNodes.push(Lib_123Node10);
- this['Lib_123Node11'] = Lib_123Node11;
- Lib_123Node11.__parentLib = nodename;
- Lib_123Node11.__parent = this;
- this.childNodes.push(Lib_123Node11);
- this['Lib_123Node12'] = Lib_123Node12;
- Lib_123Node12.__parentLib = nodename;
- Lib_123Node12.__parent = this;
- this.childNodes.push(Lib_123Node12);
- this['Lib_123Node13'] = Lib_123Node13;
- Lib_123Node13.__parentLib = nodename;
- Lib_123Node13.__parent = this;
- this.childNodes.push(Lib_123Node13);
- this['Lib_123Node14'] = Lib_123Node14;
- Lib_123Node14.__parentLib = nodename;
- Lib_123Node14.__parent = this;
- this.childNodes.push(Lib_123Node14);
- this['Lib_123Node15'] = Lib_123Node15;
- Lib_123Node15.__parentLib = nodename;
- Lib_123Node15.__parent = this;
- this.childNodes.push(Lib_123Node15);
- this['Lib_123Node16'] = Lib_123Node16;
- Lib_123Node16.__parentLib = nodename;
- Lib_123Node16.__parent = this;
- this.childNodes.push(Lib_123Node16);
- this['Lib_123Node17'] = Lib_123Node17;
- Lib_123Node17.__parentLib = nodename;
- Lib_123Node17.__parent = this;
- this.childNodes.push(Lib_123Node17);
- this['Lib_123Node18'] = Lib_123Node18;
- Lib_123Node18.__parentLib = nodename;
- Lib_123Node18.__parent = this;
- this.childNodes.push(Lib_123Node18);
- /*@ControlContextMenu@*/
- /*@Declare@*/
- this.init(x, y, width, height, angle);
- };
- ht.Default.def('ht.lib.123', Object, {
- refresh10ms: function () {
-
- var localVarObj = this.localVarObj;
- var localDynamicVarObj = this.localDynamicVar();
- var Lib_123Node0= this.Lib_123Node0;
- var Lib_123Node1= this.Lib_123Node1;
- var Lib_123Node2= this.Lib_123Node2;
- var Lib_123Node3= this.Lib_123Node3;
- var Lib_123Node4= this.Lib_123Node4;
- var Lib_123Node5= this.Lib_123Node5;
- var Lib_123Node6= this.Lib_123Node6;
- var Lib_123Node7= this.Lib_123Node7;
- var Lib_123Node8= this.Lib_123Node8;
- var Lib_123Node9= this.Lib_123Node9;
- var Lib_123Node10= this.Lib_123Node10;
- var Lib_123Node11= this.Lib_123Node11;
- var Lib_123Node12= this.Lib_123Node12;
- var Lib_123Node13= this.Lib_123Node13;
- var Lib_123Node14= this.Lib_123Node14;
- var Lib_123Node15= this.Lib_123Node15;
- var Lib_123Node16= this.Lib_123Node16;
- var Lib_123Node17= this.Lib_123Node17;
- var Lib_123Node18= this.Lib_123Node18;
- /*@refresh10ms@*/
- },
- refresh100ms: function () {
-
- var localVarObj = this.localVarObj;
- var localDynamicVarObj = this.localDynamicVar();
- var Lib_123Node0= this.Lib_123Node0;
- var Lib_123Node1= this.Lib_123Node1;
- var Lib_123Node2= this.Lib_123Node2;
- var Lib_123Node3= this.Lib_123Node3;
- var Lib_123Node4= this.Lib_123Node4;
- var Lib_123Node5= this.Lib_123Node5;
- var Lib_123Node6= this.Lib_123Node6;
- var Lib_123Node7= this.Lib_123Node7;
- var Lib_123Node8= this.Lib_123Node8;
- var Lib_123Node9= this.Lib_123Node9;
- var Lib_123Node10= this.Lib_123Node10;
- var Lib_123Node11= this.Lib_123Node11;
- var Lib_123Node12= this.Lib_123Node12;
- var Lib_123Node13= this.Lib_123Node13;
- var Lib_123Node14= this.Lib_123Node14;
- var Lib_123Node15= this.Lib_123Node15;
- var Lib_123Node16= this.Lib_123Node16;
- var Lib_123Node17= this.Lib_123Node17;
- var Lib_123Node18= this.Lib_123Node18;
- /*@refresh100ms@*/
- },
- refresh500ms: function () {
-
- var localVarObj = this.localVarObj;
- var localDynamicVarObj = this.localDynamicVar();
- var Lib_123Node0= this.Lib_123Node0;
- var Lib_123Node1= this.Lib_123Node1;
- var Lib_123Node2= this.Lib_123Node2;
- var Lib_123Node3= this.Lib_123Node3;
- var Lib_123Node4= this.Lib_123Node4;
- var Lib_123Node5= this.Lib_123Node5;
- var Lib_123Node6= this.Lib_123Node6;
- var Lib_123Node7= this.Lib_123Node7;
- var Lib_123Node8= this.Lib_123Node8;
- var Lib_123Node9= this.Lib_123Node9;
- var Lib_123Node10= this.Lib_123Node10;
- var Lib_123Node11= this.Lib_123Node11;
- var Lib_123Node12= this.Lib_123Node12;
- var Lib_123Node13= this.Lib_123Node13;
- var Lib_123Node14= this.Lib_123Node14;
- var Lib_123Node15= this.Lib_123Node15;
- var Lib_123Node16= this.Lib_123Node16;
- var Lib_123Node17= this.Lib_123Node17;
- var Lib_123Node18= this.Lib_123Node18;
- /*@refresh500ms@*/
- },
- refresh1s: function () {
- var Counter1s = arguments[0] || 0;
-
- var localVarObj = this.localVarObj;
- var localDynamicVarObj = this.localDynamicVar();
- var Lib_123Node0= this.Lib_123Node0;
- var Lib_123Node1= this.Lib_123Node1;
- var Lib_123Node2= this.Lib_123Node2;
- var Lib_123Node3= this.Lib_123Node3;
- var Lib_123Node4= this.Lib_123Node4;
- var Lib_123Node5= this.Lib_123Node5;
- var Lib_123Node6= this.Lib_123Node6;
- var Lib_123Node7= this.Lib_123Node7;
- var Lib_123Node8= this.Lib_123Node8;
- var Lib_123Node9= this.Lib_123Node9;
- var Lib_123Node10= this.Lib_123Node10;
- var Lib_123Node11= this.Lib_123Node11;
- var Lib_123Node12= this.Lib_123Node12;
- var Lib_123Node13= this.Lib_123Node13;
- var Lib_123Node14= this.Lib_123Node14;
- var Lib_123Node15= this.Lib_123Node15;
- var Lib_123Node16= this.Lib_123Node16;
- var Lib_123Node17= this.Lib_123Node17;
- var Lib_123Node18= this.Lib_123Node18;
- /*@refresh1s@*/
- },
- refresh5s: function () {
-
- var localVarObj = this.localVarObj;
- var localDynamicVarObj = this.localDynamicVar();
- var Lib_123Node0= this.Lib_123Node0;
- var Lib_123Node1= this.Lib_123Node1;
- var Lib_123Node2= this.Lib_123Node2;
- var Lib_123Node3= this.Lib_123Node3;
- var Lib_123Node4= this.Lib_123Node4;
- var Lib_123Node5= this.Lib_123Node5;
- var Lib_123Node6= this.Lib_123Node6;
- var Lib_123Node7= this.Lib_123Node7;
- var Lib_123Node8= this.Lib_123Node8;
- var Lib_123Node9= this.Lib_123Node9;
- var Lib_123Node10= this.Lib_123Node10;
- var Lib_123Node11= this.Lib_123Node11;
- var Lib_123Node12= this.Lib_123Node12;
- var Lib_123Node13= this.Lib_123Node13;
- var Lib_123Node14= this.Lib_123Node14;
- var Lib_123Node15= this.Lib_123Node15;
- var Lib_123Node16= this.Lib_123Node16;
- var Lib_123Node17= this.Lib_123Node17;
- var Lib_123Node18= this.Lib_123Node18;
- /*@refresh5s@*/
- },
- /*@PageDynamic@*/
- onEvent: function (e, data, type, origin, offset, objMouseOn, ctm) {
-
- var localVarObj = this.localVarObj;
- var localDynamicVarObj = this.localDynamicVar();
- var Lib_123Node0= this.Lib_123Node0;
- var Lib_123Node1= this.Lib_123Node1;
- var Lib_123Node2= this.Lib_123Node2;
- var Lib_123Node3= this.Lib_123Node3;
- var Lib_123Node4= this.Lib_123Node4;
- var Lib_123Node5= this.Lib_123Node5;
- var Lib_123Node6= this.Lib_123Node6;
- var Lib_123Node7= this.Lib_123Node7;
- var Lib_123Node8= this.Lib_123Node8;
- var Lib_123Node9= this.Lib_123Node9;
- var Lib_123Node10= this.Lib_123Node10;
- var Lib_123Node11= this.Lib_123Node11;
- var Lib_123Node12= this.Lib_123Node12;
- var Lib_123Node13= this.Lib_123Node13;
- var Lib_123Node14= this.Lib_123Node14;
- var Lib_123Node15= this.Lib_123Node15;
- var Lib_123Node16= this.Lib_123Node16;
- var Lib_123Node17= this.Lib_123Node17;
- var Lib_123Node18= this.Lib_123Node18;
-
- 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);
- }
- });
- }
|