2016-09-06 14:07:11 +00:00
( function ( )
{
/ * *
* Download from following URL as TSV and convert using https : //jgraph.github.io/drawio-tools/tools/convert.html:
* https : //docs.google.com/spreadsheets/d/1sAL1zn-UtmJtKPH4cLApGjRX-TRSJa5dYdfZ9NKYfRs
* Maps package and stencil names to additional tags .
* /
Sidebar . prototype . tagIndex = ' vX3ZcttI0vXTTPz / XIihlrvb31xqt2YsWy3K9tw5QBISMSIBNhbL6qefczKrsJBYCosmgkGCJPJUoZasrNxq + / M 6 9 n b r m R f H 0 U v y t + N / y A U + D 1 6 n 1 V t n Z 3 6 Y / u 3 k + K P / y I 9 T Q + a F T x t / h Y s 0 i 0 N X j P v g a T 0 a 5 M u u h J D t 2 m H 2 M c 6 9 z S b K C H M R Z Y u N X 4 J K X y J 8 e / F e X R q l w P k j 8 1 Y l l M c o i 3 v A r P 0 f c R S W 6 M M o X a 7 l Y Z L g K f Q 2 + C v o b p r z I F 5 m G 4 8 l W 6 A l f t o E 4 Z N L N f 6 Z b X d H K M Z S n x z / g v t i f 7 f h U y y 8 5 T O b O l x F 8 q t 8 u E O d D I U y I 8 4 L 2 b 6 V X o / i d B 0 9 R W w e x 7 H z y T T r y f F c m r V c R b S V 6 Q a H p h r V 3 f O N H 6 5 8 E u z N p u Q 5 C E N C h H Z a J p t g 6 w r 2 I C P 3 G + p Q g 7 j S c d 4 M 3 Y z 7 L V h x g j x 4 A a f X u N o + x E G l 4 d J 1 7 B P c s e U O H / H k + E M U B 3 9 F Y S q j Y F 3 + M g j u q x + n w V L o f x S X L V B / Z b E / O 1 0 u / S Q B + T k K j y O S J P 4 y i 4 O U z / X s 8 / 3 g h y a s L I 2 2 X h r I S P T w B R 9 P P m b 1 8 T 8 2 5 J y h T u d l x P f H j Z e s W 4 D m q D + 7 X e 8 2 M O 2 P w n c 2 y A a P z x q A o b B X w Z K C R z S H q Z g T x r m H O b V X b 1 v j l Z d 6 C y / h 3 6 t F N 9 S t F z / 7 6 W 7 j L U m x l W / C S o i Z r C O u A N 0 o 8 4 t / 8 f b o M X 3 x 5 I e V / 8 P f R L u t L i r P A T G T Z e y / r O I A / e / 6 o P N s A a p g Z x p n i V W B z H v n h 8 v g c P w 0 g H z z F 0 m Q 8 v E W W F f Y X Z t o w a + t 1 G d g p l j / U A c / / h F I 6 9 j i 8 S m M N k m j 3 Y s H 1 s c Z F 2 z L k P t g Q X q W L d m 0 H M o y 7 + f g b Y K 6 0 D + 6 J 8 N Z 8 N e D t 3 k u q k R B w 9 a p i / i c k 0 7 G m T w J F g d 0 T S C T c O X L i r g K d h t M E L Z P 5 s V e m I K D c I g t / V B G 0 8 6 P t 9 K P h 9 h S h 0 p L O U + L P V o z 1 x + D p y z W K X F y f A U G K a x 2 m c l 4 I j z v 6 A m N q z v 0 q f f E K 4 O 5 i H 6 6 t J 3 2 2 G E 9 u g m 3 u y y V 4 b 6 N w i C N e L U K E k y 3 Q 7 5 8 Q I s e k N l z 4 W 8 4 Z 8 h N P / m Q o 2 K O P d v v d t q X W U E z 6 E U D c 2 i 8 P 4 5 2 Z 2 i j m l E r L b c z D d o B c 4 l H i X d x I A U v s m C z 0 o o u s i Q I y e A 7 6 P u 3 v F C o d N S D 6 j p I P 2 Q L + 7 R o Z I 9 U 0 T K N 9 O r J j P 8 m + g 8 X N y E E S 0 j h z X y 4 n t D 3 N u m a Y 2 K N O S N D f O 0 L j 8 F 3 / O N A T F 6 u Y 0 z b 1 g I Z Q b e r A q + Y 3 l y m u Y / w l 5 E Z b 7 d e i O 7 l q H X l M x + 9 H b i i z N F 8 7 H f R 3 G I I 6 C j a Q h j C h 2 8 / Q 1 l F 9 s b X P n W 0 0 O G x W 0 c h P 9 M o E 5 b s Q l X h p U n O v 1 q g 9 n G y T R q Q O X g Y J b J D y N I 1 W W u + o p f k E 7 N u 7 L y V u W r B f Z 3 / 8 Z G T v x h G y Z / C r Z v H 1 R 4 E p P J C s o B A h 5 H N I a 1 b q + 5 e 2 S N / i H b B U u S W q v x S C 7 g H 9 R m D C z g Y l 2 j v 1 y T 1 t 7 i 4 2 W q f R 2 z 6 t R e T V Y M 3 y q B f 7 Q 2 1 P b y 7 6 M W P 5 2 s f q / k Q t n x / c S f D f I s n l D r 1 h 5 h z v 5 O h K Y q l 3 0 o F H X S U Z o Y V i d E p 5 c W 6 z X O 5 X 5 e 9 s 4 z L 6 h + Z n 8 k w / 5 M X A w D u / b p l y 4 l U B g 8 v d L t Z F u t Y I 3 A M G V t J V d x r L 2 J / e j g t a H t U q I r 8 o K K i w a h n d Y 1 A 8 9 e Q d d + f l 4 n + H P v L 1 6 V 0 d S v Q v b / D t l s 5 9 z 5 S a Y w 8 6 q h p g k r B 8 k V m f f B k H r m L Y X M w L 5 2 O K L t S R h v F P N j u d B v k u D o 8 E J w P s r V M 2 4 l Z f w m x V w Z P f Q x k p 2 x k k c + L / / h L g m W P 3 M t 5 m 8 D v H D V f w O P J Y L K t x 3 t 3 f q Q P o F + 9 H 2 j 6 c l v t U X / 9 c G F 5 V Q 2 T q r 9 f B w k / D G 9 T a n c 2 / j V A p 4 q q 6 h b b P s h L 3 E K T 8 3 a I l J 0 w Y E K + B / 0 O A R / z q z p U K a 4 T t x B O w / y q q 4 W + n V 6 c X 1 1 L 6 3 h P Y Z R g 3 S S b 6 M 8 d 7 S b v 5 P j a D / 1 Y 2 I n d 5 z V V 5 x C C M z G S o u v 3 i G 1 E Z G T O V K i O y F u 2 N J 2 i O l / d K a X I V t I n I c V A C 5 a z X 7 k D i g L Z U 5 B V W A V b f X X L l L 8 f U i Z B 0 8 6 p T P h / h 4 S + k Y + 7 S M + 8 E P 2 o O 5 w m N W v 5 f u y X t C W j r Z + i / x v 1 S x W i O J L d x 2 6 D Z Q r z v 3 5 K l y k u D p g x F D g i M n q U o N t I r 9 q 3 a r U 0 k O 1 F 2 s q 3 A R u I 5 o L x f C g V l w l v I 1 l C Q 8 f W / k S N 3 f x 1 u x A d 2 2 M U L 4 I V W K 4 D 5 e d C W 4 x 1 B 3 p I m g t E a X k g u N f S z 7 d o R j I Z E c e w s x c e u d v V b p A r h G Y I Y 2 / M 5 p d R 1 k W S E X 0 l P A 3 v 0 h F d N A + B S F t 2 P y a f V J N 1 0 X 3 z p F 5 m 9 C 7 s a G 6 l + b d R K o l Y H S 5 9 9 k X I t a 2 u Q w r a K E q T F J e z 7 k r W 0 9 0 2 b r u 2 + d a s H S H r v a 4 a h N 2 W N 5 Q U A b s 4 E p 0 v V 6 K V t E A T 3 e y U w s C H i K z e t Z l J B p F U C w M T h Q h f i E t t o k + J / m O k P W S t Q k 3 W v h o q o 2 8 t s b W 8 x q K / X 8 v D N G J g O 6 5 L r a n w m u J 0 Z 3 3 z P Y e h M g w L g p h u z 1 s 5 l w D k 0 r y T X F m i F H G r q G 7 f 0 b H 0 F u i p V P S c e s n R + W c W q G K 5 s W x L N z s / o 7 U t 7 y 2 o b 0 6 O F 7 H v a R f o i r H T J d g J 5 + T 4 5 y / H 0 6 C d N N W K l t J + O G 2 1 6 o n 2 r r F W Y l H q h 4 R 6 / T Y V 3 K 9 N F T M i T B + g l n r 1 Q L s 9 1 / b / D W + / v z v l I 9 9 x T A d h Y G X p H k / u g v + r C 3 7 9 E z T C / / 5 O y j h + s / q X C 5 j 2 A S L q O v 9 S s / N L Q D O M f Y T 8 H y y n + k + f e t f h a s 3 H 4 3 L 3 K r x E u v X X Y z R L f S s 4 M L c q I B / + Z C q 0 d y d a x w n w 7 m I s N 0 u j R A T 4 Y M B 7 P w l W u v y d Z 3 F s b S N m Z T p h B 8 X L 9 u X Q E U s 6 2 x l r n s V i U q o 8 6 C + E a F o R 3 G H k q Z p Y u D u M z I p m l u s O J C 3 T y C N r c R 5 o N t T d w a / H 2 y 0 H l q 5 W i 1 p 9 a S f G B B D k S u N h f p v g a b i x P v l t P M 7 7 n h h + w O U U w 7 4 w y 2 H 7 5 O N P o 3 r d e R Q O D 9 2 9 l P x x E 0 U x d E P 8 H x q i Z n v C 3 u 1 w M i N X N c 5 h q K g Y c R / h Y h S Y B c E R Y Y 7 d s y A 0 0 z a Q R 9 H z U t V u f U n P 1 1 4 g 6 1 N f O i i 3 h c f B J 0 K t S 2 5 U q h e F T w V N 8 r 3 a 6 P z + g U L 3 1 4 o O r 6 T X q 6 l H D c q F D 6 G d y t Z Y N y h 2 d 9 S r K l U Q N c g O A 4 q x Y 7 O W y E Q 2 A n A 1 W c W q b 2 u A q s G 5 3 P j Y b k g 7 + A m U R O b a p Q r Q 3 8 g u a m S 7 X v G K T m r e l p O w X g l R T 1 p n X N 1 x x 7 j 1 z D t m c a R u Q L Y y 1 H w m a e F e V A P 7 + R F 2 P v E r M k N 8 2 T n U a 1 D u o P o R n y r 4 j n D p D E K o B u r V t 3 X U e F N F V 0 x 1 O P 6 A i c + J E P Z u b Y l e 8 + s e e i o + M l 0 x o W 3 a o P K 9 a T m Y e 9 P 6 j 3 E A k 7 o Z d 3 3 J 5 8 o O l o Y 7 9 O o g M b 5 I O 8 l u 3 J 1 E W 8 m Q D S j S + G G M o H 8 3 k v 7 X k f T c L g 6 i j 6 D c 5 L A G 6 8 A 4 F b U L 1 R 0 R v C t o G 8 Q M i a J D 3 8 5 9 m G / w 2 h L Z P I L M x W E D r z M / X t p v L j W h 3 a B g A 5 s B j K R k i u D s B I 8 Q z T S v l W W o u w n U M 4 V n G Y w 6 s V d r P M o h Z q c h F F L W y 4 A D D X U y X A N N 3 m 0 O b k D i k B u M d B 5 t 0 G N 8 6 j W E 3 S c o 7 g 9 9 l O o p 9 w 3 S U O c a w 2 o 3 a a O d t 4 1 K H F C O S r R b / u B k O S t A 7 k Q F S E W d a H 0 7 t a n 7 9 P O i 1 4 2 9 k 8 t 8 o / 7 / g J y G a 9 P 7 c O o I d t J + 4 m P v 1 H K W n n 0 + j D 6 C Q 2 R R 9 a Z O a 6 D O t p D D x Y 8 k C 3 W n R F c G D v s G g 9 I + w g O W z O R R 1 c B G l Y x F o t 4 2 o b Q b 3 w u / b 7 F 6 q B n p h 7 e B S 8 f J M f i J X 5 l v 7 Z R w k w u D R D 3 3 r 6 N o R Z U 4 / K K 5 K U Y T b I d W a H Y t 1 i T x Q M f 2 c Z X Z 7 a P x m t E 6 y 6 w S E 6 Y j 6 u c s x a 6 9 8 E I U t X B R 0 S T j W t o 2 X i t o c E i H O 3 B J K 2 1 M G C 6 0 p 4 E w V V b l P Z t I h a X Y m j b 1 v 3 q O D N k o j g K O i i 0 2 a R J g 0 8 y + z c 3 q C / r T m N l P b W u e i d J 8 1 W X m 6 Q a h L B q u I A 3 L h J 0 Y E P 7 X a + N 9 X T + E + k K P h Z t j l E h 0 y B T t W A s 2 R X t 2 A r 9 R Q w y C v a O 7 p E j D p d F t H H x a d 0 U W 4 I 8 M V l a s 0 F h 2 N V B A L x b q a i B f 9 d o V R N e C g U A w m O l 9 4 h R a I t r D a 8 U A o 9 A t L / x + K E W S x 1 5 h V U 7 U 2 d 5 1 U L T i Y D y Y P u r R W Q X i n e y p B 1 b H E g + q A + R q o w m w + o C W T W J O h J E L D 7 C N x C L i W u Q k / d p F S Q 9 N
/ * *
* See etc / build / README on how to update this file
* /
Sidebar . prototype . searchFileUrl = 'search.xml' ;
/ * *
* Overrides gear image URL .
* /
Sidebar . prototype . gearImage = GRAPH _IMAGE _PATH + '/clipart/Gear_128x128.png' ;
/ * *
*
* /
Sidebar . prototype . defaultEntries = 'general;images;uml;er;bpmn;flowchart;basic;arrows2' ;
/ * *
*
* /
Sidebar . prototype . signs = [ 'Animals' , 'Food' , 'Healthcare' , 'Nature' , 'People' , 'Safety' , 'Science' , 'Sports' , 'Tech' , 'Transportation' , 'Travel' ] ;
2017-01-18 07:58:48 +00:00
/ * *
*
* /
Sidebar . prototype . gcp = [ 'Big Data' , 'Compute' , 'Developer Tools' , 'Extras' , 'Identity and Security' , 'Machine Learning' , 'Management Tools' , 'Networking' , 'Storage Databases' ] ;
2016-09-06 14:07:11 +00:00
/ * *
*
* /
Sidebar . prototype . rack = [ 'General' , 'APC' , 'Cisco' , 'Dell' , 'F5' , 'HP' , 'IBM' , 'Oracle' ] ;
/ * *
*
* /
Sidebar . prototype . pids = [ 'Agitators' , 'Apparatus Elements' , 'Centrifuges' , 'Compressors' , 'Compressors ISO' , 'Crushers Grinding' ,
'Driers' , 'Engines' , 'Feeders' , 'Filters' , 'Fittings' , 'Flow Sensors' , 'Heat Exchangers' , 'Instruments' , 'Misc' ,
'Mixers' , 'Piping' , 'Pumps' , 'Pumps DIN' , 'Pumps ISO' , 'Separators' , 'Shaping Machines' , 'Valves' , 'Vessels' ] ;
/ * *
*
* /
Sidebar . prototype . cisco = [ 'Buildings' , 'Computers and Peripherals' , 'Controllers and Modules' , 'Directors' , 'Hubs and Gateways' , 'Misc' ,
'Modems and Phones' , 'People' , 'Routers' , 'Security' , 'Servers' , 'Storage' , 'Switches' , 'Wireless' ] ;
/ * *
*
* /
Sidebar . prototype . sysml = [ 'Model Elements' , 'Blocks' , 'Ports and Flows' , 'Constraint Blocks' , 'Activities' , 'Interactions' , 'State Machines' ,
'Use Cases' , 'Allocations' , 'Requirements' , 'Profiles' , 'Stereotypes' ] ;
/ * *
*
* /
Sidebar . prototype . eip = [ 'Message Construction' , 'Message Routing' , 'Message Transformation' , 'Messaging Channels' , 'Messaging Endpoints' ,
'Messaging Systems' , 'System Management' ] ;
/ * *
*
* /
Sidebar . prototype . gmdl = [ 'Bottom Navigation' , 'Bottom Sheets' , 'Buttons' , 'Cards' , 'Chips' , 'Dialogs' , 'Dividers' , 'Grid Lists' , 'Icons' , 'Lists' , 'Menus' , 'Misc' , 'Pickers' ,
'Selection Controls' , 'Sliders' , 'Steppers' , 'Tabs' , 'Text Fields' ] ;
/ * *
*
* /
Sidebar . prototype . aws2 = [ 'Analytics' , 'Application Services' , 'Compute' , 'Database' , 'Developer Tools' , 'Enterprise Applications' , 'Game Development' , 'General' , 'Internet of Things' ,
'Management Tools' , 'Mobile Services' , 'Networking' , 'On-Demand Workforce' , 'SDKs' , 'Security and Identity' , 'Storage and Content Delivery' , 'Groups' ] ;
/ * *
*
* /
Sidebar . prototype . office = [ 'Clouds' , 'Communications' , 'Concepts' , 'Databases' , 'Devices' , 'Security' , 'Servers' , 'Services' , 'Sites' , 'Users' ] ;
2016-10-03 16:15:00 +00:00
/ * *
*
* /
Sidebar . prototype . veeam = [ '2D' , '3D' ] ;
2016-09-06 14:07:11 +00:00
/ * *
*
* /
Sidebar . prototype . archimate3 = [ 'Application' , 'Business' , 'Composite' , 'Implementation and Migration' , 'Motivation' , 'Physical' , 'Relationships' , 'Strategy' , 'Technology' ] ;
2016-11-07 11:51:48 +00:00
/ * *
*
* /
Sidebar . prototype . electrical = [ 'LogicGates' , 'Resistors' , 'Capacitors' , 'Inductors' , 'SwitchesRelays' , 'Diodes' , 'Sources' , 'Transistors' , 'Misc' , 'Audio' , 'PlcLadder' , 'Abstract' , 'Optical' , 'VacuumTubes' , 'Waveforms' , 'Instruments' , 'RotMech' , 'Transmission' ] ;
2016-09-06 14:07:11 +00:00
/ * *
*
* /
Sidebar . prototype . configuration = [ { id : 'general' , libs : [ 'general' , 'misc' , 'advanced' ] } , { id : 'uml' } , { id : 'search' } , { id : 'er' } ,
{ id : 'ios' , prefix : 'ios' , libs : [ '' /*prefix is library*/ , '7icons' , '7ui' ] } ,
{ id : 'android' , prefix : 'android' , libs : [ '' /*prefix is library*/ ] } , { id : 'aws3d' } ,
{ id : 'flowchart' } , { id : 'basic' } , { id : 'arrows' } , { id : 'arrows2' } , { id : 'lean_mapping' } , { id : 'citrix' } , { id : 'azure' } , { id : 'network' } ,
{ id : 'mscae' , prefix : 'mscae' , libs : [ 'Cloud' , 'Enterprise' , 'General' , 'Intune' , 'Other' , 'System Center' , 'Deprecated' ] } ,
{ id : 'bpmn' , prefix : 'bpmn' , libs : [ '' /*prefix is library*/ , 'Gateways' , 'Events' ] } ,
{ id : 'clipart' , prefix : null , libs : [ 'computer' , 'finance' , 'clipart' , 'networking' , 'people' , 'telco' ] } ,
{ id : 'eip' , prefix : 'eip' , libs : Sidebar . prototype . eip } ,
{ id : 'mockups' , prefix : 'mockup' , libs : [ 'Buttons' , 'Containers' , 'Forms' , 'Graphics' , 'Markup' , 'Misc' , 'Navigation' , 'Text' ] } ,
{ id : 'pid2' , prefix : 'pid2' , libs : [ 'Agitators' , 'Apparatus Elements' , 'Centrifuges' , 'Compressors' , 'Compressors ISO' , 'Crushers Grinding' ,
'Driers' , 'Engines' , 'Feeders' , 'Filters' , 'Fittings' , 'Flow Sensors' , 'Heat Exchangers' , 'Instruments' , 'Misc' ,
'Mixers' , 'Piping' , 'Pumps' , 'Pumps DIN' , 'Pumps ISO' , 'Separators' , 'Shaping Machines' , 'Valves' , 'Vessels' ] } ,
{ id : 'signs' , prefix : 'signs' , libs : Sidebar . prototype . signs } ,
2017-01-18 07:58:48 +00:00
{ id : 'gcp' , prefix : 'gcp' , libs : Sidebar . prototype . gcp } ,
2016-09-06 14:07:11 +00:00
{ id : 'rack' , prefix : 'rack' , libs : Sidebar . prototype . rack } ,
2016-11-07 11:51:48 +00:00
{ id : 'electrical' , prefix : 'electrical' , libs : Sidebar . prototype . electrical } ,
2016-09-06 14:07:11 +00:00
{ id : 'aws2' , prefix : 'aws2' , libs : Sidebar . prototype . aws2 } ,
{ id : 'pid' , prefix : 'pid' , libs : Sidebar . prototype . pids } ,
{ id : 'cisco' , prefix : 'cisco' , libs : Sidebar . prototype . cisco } ,
{ id : 'office' , prefix : 'office' , libs : Sidebar . prototype . office } ,
2016-10-03 16:15:00 +00:00
{ id : 'veeam' , prefix : 'veeam' , libs : Sidebar . prototype . veeam } ,
2016-09-06 14:07:11 +00:00
{ id : 'cabinets' , libs : [ 'cabinets' ] } ,
{ id : 'floorplan' , libs : [ 'floorplan' ] } ,
{ id : 'bootstrap' , libs : [ 'bootstrap' ] } ,
{ id : 'gmdl' , prefix : 'gmdl' , libs : Sidebar . prototype . gmdl } ,
{ id : 'archimate3' , prefix : 'archimate3' , libs : Sidebar . prototype . archimate3 } ,
{ id : 'archimate' , libs : [ 'archimate' ] } ,
2017-01-18 07:58:48 +00:00
{ id : 'webicons' , libs : [ 'webicons' , 'weblogos' ] } ,
2016-09-06 14:07:11 +00:00
{ id : 'sysml' , prefix : 'sysml' , libs : Sidebar . prototype . sysml } ] ;
2016-09-20 12:35:42 +00:00
/ * *
* Adds hint for quick tutorial video for certain search terms .
* /
var siderbarInsertSearchHint = Sidebar . prototype . insertSearchHint ;
Sidebar . prototype . insertSearchHint = function ( div , searchTerm , count , page , results , len , more , terms )
{
if ( terms != null && page == 1 )
{
var hintText = null ;
// Adds hint for text inserts
if ( mxUtils . indexOf ( terms , 'text' ) >= 0 )
{
hintText = 'Double click anywhere in the diagram to insert text.' ;
}
else
{
// Checks if any of the following keywords are in the search terms
var words = [ 'line' , 'lines' , 'arrow' , 'arrows' , 'connect' , 'connection' , 'connections' ,
'connector' , 'connectors' , 'curve' , 'curves' , 'link' , 'links' ] ;
for ( var i = 0 ; i < words . length ; i ++ )
{
if ( mxUtils . indexOf ( terms , words [ i ] ) >= 0 )
{
hintText = 'Need help with connections?' ;
break ;
}
}
}
if ( hintText != null )
{
var link = document . createElement ( 'a' ) ;
link . setAttribute ( 'href' , 'https://www.youtube.com/watch?v=8OaMWa4R1SE&t=1' ) ;
link . setAttribute ( 'target' , '_blank' ) ;
link . className = 'geTitle' ;
link . style . cssText = 'background-color:#ffd350;border-radius:6px;color:black;' +
'border:1px solid black !important;text-align:center;white-space:normal;' +
'padding:6px 0px 6px 0px !important;margin:4px 4px 8px 2px;' ;
mxUtils . write ( link , hintText ) ;
div . appendChild ( link ) ;
}
}
siderbarInsertSearchHint . apply ( this , arguments ) ;
} ;
2016-09-06 14:07:11 +00:00
/ * *
* Toggle palette .
* /
Sidebar . prototype . togglePalettes = function ( prefix , ids )
{
this . showPalettes ( prefix , ids ) ;
} ;
/ * *
* Toggle palette .
* /
Sidebar . prototype . togglePalette = function ( id )
{
this . showPalette ( id ) ;
} ;
/ * *
* Shows or hides palettes .
* /
Sidebar . prototype . showPalettes = function ( prefix , ids , visible )
{
for ( var i = 0 ; i < ids . length ; i ++ )
{
this . showPalette ( prefix + ids [ i ] , visible ) ;
}
} ;
/ * *
* Shows or hides a palette .
* /
Sidebar . prototype . showPalette = function ( id , visible )
{
var elts = this . palettes [ id ] ;
if ( elts != null )
{
var vis = ( visible != null ) ? ( ( visible ) ? 'block' : 'none' ) : ( elts [ 0 ] . style . display == 'none' ) ? 'block' : 'none' ;
for ( var i = 0 ; i < elts . length ; i ++ )
{
elts [ i ] . style . display = vis ;
}
}
} ;
/ * *
*
* /
Sidebar . prototype . isEntryVisible = function ( key )
{
for ( var i = 0 ; i < this . configuration . length ; i ++ )
{
if ( this . configuration [ i ] . id == key )
{
var id = ( this . configuration [ i ] . libs != null ) ? ( ( this . configuration [ i ] . prefix || '' ) + this . configuration [ i ] . libs [ 0 ] ) : key ;
var elts = this . palettes [ id ] ;
if ( elts != null )
{
return elts [ 0 ] . style . display != 'none' ;
}
}
}
return false ;
} ;
/ * *
*
* /
Sidebar . prototype . showEntries = function ( stc , remember , force )
{
this . libs = ( stc != null && ( force || stc . length > 0 ) ) ? stc : ( ( urlParams [ 'libs' ] != null &&
urlParams [ 'libs' ] . length > 0 ) ? decodeURIComponent ( urlParams [ 'libs' ] ) : mxSettings . getLibraries ( ) ) ;
var tmp = this . libs . split ( ';' ) ;
for ( var i = 0 ; i < this . configuration . length ; i ++ )
{
// Search has separate switch in Extras menu
if ( this . configuration [ i ] . id != 'search' )
{
this . showPalettes ( this . configuration [ i ] . prefix || '' , this . configuration [ i ] . libs || [ this . configuration [ i ] . id ] , mxUtils . indexOf ( tmp , this . configuration [ i ] . id ) >= 0 ) ;
}
}
if ( remember )
{
mxSettings . setLibraries ( stc ) ;
mxSettings . save ( ) ;
}
} ;
/ * *
* Overrides the sidebar init .
* /
Sidebar . prototype . init = function ( )
{
// Defines all entries for the sidebar. This is used in the MoreShapes dialog. Create screenshots using the savesidebar URL parameter and
// http://www.alderg.com/merge.html for creating a vertical stack of PNG images if multiple sidebars are part of an entry.
this . entries = [ { title : mxResources . get ( 'standard' ) ,
entries : [ { title : mxResources . get ( 'general' ) , id : 'general' , image : IMAGE _PATH + '/sidebar-general.png' } ,
{ title : mxResources . get ( 'arrows' ) , id : 'arrows2' , image : IMAGE _PATH + '/sidebar-arrows2.png' } ,
{ title : mxResources . get ( 'basic' ) , id : 'basic' , image : IMAGE _PATH + '/sidebar-basic.png' } ,
{ title : mxResources . get ( 'clipart' ) , id : 'clipart' , image : IMAGE _PATH + '/sidebar-clipart.jpg' } ,
{ title : mxResources . get ( 'flowchart' ) , id : 'flowchart' , image : IMAGE _PATH + '/sidebar-flowchart.png' } ] } ,
{ title : mxResources . get ( 'software' ) ,
entries : [ { title : mxResources . get ( 'android' ) , id : 'android' , image : IMAGE _PATH + '/sidebar-android.png' } ,
{ title : mxResources . get ( 'bootstrap' ) , id : 'bootstrap' , image : IMAGE _PATH + '/sidebar-bootstrap.png' } ,
{ title : mxResources . get ( 'entityRelation' ) , id : 'er' , image : IMAGE _PATH + '/sidebar-er.png' } ,
{ title : mxResources . get ( 'ios' ) , id : 'ios' , image : IMAGE _PATH + '/sidebar-ios.png' } ,
{ title : mxResources . get ( 'mockups' ) , id : 'mockups' , image : IMAGE _PATH + '/sidebar-mockups.png' } ,
{ title : mxResources . get ( 'uml' ) , id : 'uml' , image : IMAGE _PATH + '/sidebar-uml.png' } ] } ,
{ title : mxResources . get ( 'networking' ) ,
entries : [ { title : mxResources . get ( 'aws' ) , id : 'aws2' , image : IMAGE _PATH + '/sidebar-aws.png' } ,
// TODO: Add isometric containers
{ title : mxResources . get ( 'aws3d' ) , id : 'aws3d' , image : IMAGE _PATH + '/sidebar-aws3d.png' } ,
{ title : mxResources . get ( 'azure' ) , id : 'azure' , image : IMAGE _PATH + '/sidebar-azure.png' } ,
{ title : 'Cloud & Enterprise' , id : 'mscae' , image : IMAGE _PATH + '/sidebar-mscae.png' } ,
{ title : mxResources . get ( 'cisco' ) , id : 'cisco' , image : IMAGE _PATH + '/sidebar-cisco.png' } ,
{ title : 'Citrix' , id : 'citrix' , image : IMAGE _PATH + '/sidebar-citrix.png' } ,
2017-01-18 07:58:48 +00:00
{ title : 'Google Cloud Platform' , id : 'gcp' , image : IMAGE _PATH + '/sidebar-gcp.png' } ,
2016-09-06 14:07:11 +00:00
{ title : 'Network' , id : 'network' , image : IMAGE _PATH + '/sidebar-network.png' } ,
{ title : 'Office' , id : 'office' , image : IMAGE _PATH + '/sidebar-office.png' } ,
2016-10-03 16:15:00 +00:00
{ title : mxResources . get ( 'rack' ) , id : 'rack' , image : IMAGE _PATH + '/sidebar-rack.png' } ,
{ title : 'Veeam' , id : 'veeam' , image : IMAGE _PATH + '/sidebar-veeam.png' } ] } ,
2016-09-06 14:07:11 +00:00
{ title : mxResources . get ( 'business' ) ,
entries : [ { title : 'ArchiMate 3.0' , id : 'archimate3' , image : IMAGE _PATH + '/sidebar-archimate3.png' } ,
{ title : mxResources . get ( 'archiMate21' ) , id : 'archimate' , image : IMAGE _PATH + '/sidebar-archimate.png' } ,
{ title : mxResources . get ( 'bpmn' ) , id : 'bpmn' , image : IMAGE _PATH + '/sidebar-bpmn.png' } ,
{ title : mxResources . get ( 'leanMapping' ) , id : 'lean_mapping' , image : IMAGE _PATH + '/sidebar-leanmapping.png' } ,
{ title : mxResources . get ( 'sysml' ) , id : 'sysml' , image : IMAGE _PATH + '/sidebar-sysml.png' } ] } ,
{ title : mxResources . get ( 'other' ) ,
entries : [ { title : mxResources . get ( 'cabinets' ) , id : 'cabinets' , image : IMAGE _PATH + '/sidebar-cabinets.png' } ,
{ title : mxResources . get ( 'eip' ) , id : 'eip' , image : IMAGE _PATH + '/sidebar-eip.png' } ,
{ title : mxResources . get ( 'electrical' ) , id : 'electrical' , image : IMAGE _PATH + '/sidebar-electrical.png' } ,
{ title : mxResources . get ( 'floorplans' ) , id : 'floorplan' , image : IMAGE _PATH + '/sidebar-floorplans.png' } ,
{ title : mxResources . get ( 'gmdl' ) , id : 'gmdl' , image : IMAGE _PATH + '/sidebar-gmdl.png' } ,
{ title : mxResources . get ( 'procEng' ) , id : 'pid' , image : IMAGE _PATH + '/sidebar-pid.png' } ,
2017-01-18 07:58:48 +00:00
// TODO add to mxResources
{ title : 'Web Icons' , id : 'webicons' , image : IMAGE _PATH + '/sidebar-webIcons.png' } ,
2016-09-06 14:07:11 +00:00
{ title : mxResources . get ( 'signs' ) , id : 'signs' , image : IMAGE _PATH + '/sidebar-signs.png' } ] } ] ;
// Uses server-side stencil search if online
this . addStencilsToIndex = this . editorUi . isOffline ( ) ;
// Contains additional tags for shapes
this . shapetags = { } ;
// Adds tags from compressed text file for improved searches.
if ( this . tagIndex != null )
{
var text = this . editorUi . editor . graph . decompress ( this . tagIndex ) ;
var lines = text . split ( '\n' ) ;
for ( var i = 0 ; i < lines . length ; i ++ )
{
if ( lines [ i ] != null )
{
var tags = lines [ i ] . split ( '\t' ) ;
if ( tags . length > 1 )
{
var key = tags [ 0 ] . toLowerCase ( ) . replace ( ' ' , '_' ) ;
var value = mxUtils . trim ( tags . slice ( 1 , tags . length ) . join ( ' ' ) . toLowerCase ( ) ) ;
if ( value . length > 0 )
{
this . shapetags [ key ] = value ;
}
}
}
}
}
this . initPalettes ( ) ;
// Loads search index to avoid having to pre-parse the stencil files
// before they are used for stencils that are not programmatically added
if ( ! this . editorUi . isOffline ( ) )
{
mxUtils . get ( this . searchFileUrl , mxUtils . bind ( this , function ( req )
{
var node = req . getDocumentElement ( ) ;
if ( node != null )
{
var shapes = node . getElementsByTagName ( 'shape' ) ;
for ( var i = 0 ; i < shapes . length ; i ++ )
{
var style = shapes [ i ] . getAttribute ( 'style' ) ;
var shapeStyle = this . extractShapeStyle ( style ) ;
if ( style != null && shapeStyle != null )
{
var lastDot = shapeStyle . lastIndexOf ( '.' ) ;
if ( lastDot > 0 )
{
var pkg = shapeStyle . substring ( 0 , lastDot ) ;
var stc = shapeStyle . substring ( lastDot + 1 , shapeStyle . length ) ;
var tags = this . getTagsForStencil ( pkg , stc , shapes [ i ] . getAttribute ( 'tags' ) ) ;
// TODO: Use shapetags for programmatic stencils
if ( tags != null )
{
// Converts stencil name to lowercase
var semi = style . indexOf ( ';' ) ;
style = 'shape=' + pkg + '.' + stc . toLowerCase ( ) + ';' +
( ( semi < 0 ) ? '' : style . substring ( semi + 1 ) ) ;
this . createVertexTemplateEntry ( style , parseInt ( shapes [ i ] . getAttribute ( 'w' ) ) ,
parseInt ( shapes [ i ] . getAttribute ( 'h' ) ) , '' , stc . replace ( /_/g , ' ' ) ,
null , null , this . filterTags ( tags . join ( ' ' ) ) ) ;
}
}
}
}
}
} ) ) ;
}
}
/ * *
* Overridden to add image export via servlet
* /
if ( urlParams [ 'savesidebar' ] == '1' )
{
Sidebar . prototype . addFoldingHandler = function ( title , content , funct )
{
var initialized = false ;
// Avoids mixed content warning in IE6-8
if ( ! mxClient . IS _IE || document . documentMode >= 8 )
{
title . style . backgroundImage = ( content . style . display == 'none' ) ?
'url(\'' + this . collapsedImage + '\')' : 'url(\'' + this . expandedImage + '\')' ;
}
title . style . backgroundRepeat = 'no-repeat' ;
title . style . backgroundPosition = '0% 50%' ;
var btn = document . createElement ( 'button' ) ;
btn . style . marginLeft = '4px' ;
mxUtils . write ( btn , 'Save' ) ;
mxEvent . addListener ( title , 'click' , mxUtils . bind ( this , function ( evt )
{
if ( mxEvent . getSource ( evt ) . nodeName == 'BUTTON' )
{
var title2 = title . cloneNode ( true ) ;
title2 . style . backgroundImage = '' ;
title2 . style . textDecoration = 'none' ;
title2 . style . fontWeight = 'bold' ;
title2 . style . fontSize = '14px' ;
title2 . style . color = 'rgb(80, 80, 80)' ;
title2 . style . width = '456px' ;
title2 . style . backgroundColor = '#ffffff' ;
title2 . style . paddingLeft = '6px' ;
var btn2 = title2 . getElementsByTagName ( 'button' ) [ 0 ] ;
btn2 . parentNode . removeChild ( btn2 ) ;
var clone = content . cloneNode ( true ) ;
clone . style . backgroundColor = '#ffffff' ;
clone . style . borderColor = 'transparent' ;
clone . style . width = '456px' ;
var html = '<!DOCTYPE html><html><head><link rel="stylesheet" type="text/css" href="https://www.draw.io/styles/grapheditor.css">' +
'</head><body style="background:#ffffff;font-family:Helvetica,Arial;">' +
title2 . outerHTML + clone . outerHTML + '</body></html>' ;
clone . style . position = 'absolute' ;
window . document . body . appendChild ( clone ) ;
var h = clone . clientHeight + 18 ;
clone . parentNode . removeChild ( clone ) ;
2016-10-03 16:15:00 +00:00
new mxXmlRequest ( EXPORT _URL , 'w=456&h=' + h + '&html=' + encodeURIComponent (
this . editorUi . editor . graph . compress ( html ) ) ) . simulate ( document , '_blank' ) ;
2016-09-06 14:07:11 +00:00
return ;
}
if ( content . style . display == 'none' )
{
if ( ! initialized )
{
initialized = true ;
if ( funct != null )
{
if ( btn . parentNode != null )
{
btn . parentNode . removeChild ( btn ) ;
}
// Wait cursor does not show up on Mac
title . style . cursor = 'wait' ;
var prev = title . innerHTML ;
title . innerHTML = mxResources . get ( 'loading' ) + '...' ;
window . setTimeout ( function ( )
{
funct ( content ) ;
title . style . cursor = '' ;
title . innerHTML = prev ;
title . appendChild ( btn ) ;
} , 0 ) ;
}
else
{
title . appendChild ( btn ) ;
}
}
else
{
title . appendChild ( btn ) ;
}
title . style . backgroundImage = 'url(\'' + this . expandedImage + '\')' ;
content . style . display = 'block' ;
}
else
{
title . style . backgroundImage = 'url(\'' + this . collapsedImage + '\')' ;
content . style . display = 'none' ;
if ( btn . parentNode != null )
{
btn . parentNode . removeChild ( btn ) ;
}
}
mxEvent . consume ( evt ) ;
} ) ) ;
} ;
}
/ * *
* Overridden to use shapetags to improve search results .
* /
Sidebar . prototype . extractShapeStyle = function ( style )
{
if ( style != null && style . substring ( 0 , 6 ) == 'shape=' )
{
var semi = style . indexOf ( ';' ) ;
if ( semi < 0 )
{
semi = style . length ;
}
return style . substring ( 6 , semi ) ;
}
return null ;
} ;
/ * *
* Overridden to use shapetags to improve search results .
* /
var sidebarGetTagsForStencil = Sidebar . prototype . getTagsForStencil ;
Sidebar . prototype . getTagsForStencil = function ( pkg , stc , moreTags )
{
var tags = sidebarGetTagsForStencil . apply ( this , arguments ) ;
// Adds tags from tags file
if ( this . shapetags != null )
{
pkg = pkg . toLowerCase ( ) ;
stc = stc . toLowerCase ( ) ;
if ( this . shapetags [ pkg ] != null )
{
tags . push ( this . shapetags [ pkg ] ) ;
}
stc = pkg + '.' + stc ;
if ( this . shapetags [ stc ] != null )
{
tags . push ( this . shapetags [ stc ] ) ;
}
}
return tags ;
} ;
/ * *
* Overrides the sidebar init .
* /
Sidebar . prototype . initPalettes = function ( )
{
var imgDir = GRAPH _IMAGE _PATH ;
var dir = STENCIL _PATH ;
var signs = this . signs ;
2017-01-18 07:58:48 +00:00
var gcp = this . gcp ;
2016-09-06 14:07:11 +00:00
var rack = this . rack ;
var pids = this . pids ;
var cisco = this . cisco ;
var sysml = this . sysml ;
var eip = this . eip ;
var gmdl = this . gmdl ;
var office = this . office ;
2016-10-03 16:15:00 +00:00
var veeam = this . veeam ;
2016-09-06 14:07:11 +00:00
var archimate3 = this . archimate3 ;
2016-11-07 11:51:48 +00:00
var electrical = this . electrical ;
2016-09-06 14:07:11 +00:00
if ( urlParams [ 'createindex' ] == '1' )
{
2016-12-28 08:01:56 +00:00
mxLog . show ( ) ;
2016-09-06 14:07:11 +00:00
mxLog . textarea . value = '' ;
}
this . addSearchPalette ( true ) ;
this . addGeneralPalette ( true ) ;
this . addMiscPalette ( false ) ;
this . addAdvancedPalette ( false ) ;
this . addUmlPalette ( false ) ;
this . addErPalette ( ) ;
this . addBasicPalette ( ) ;
this . addFlowchartPalette ( ) ;
this . addNetworkPalette ( ) ;
this . addAzurePalette ( ) ;
this . addCitrixPalette ( ) ;
this . addMSCAEPalette ( ) ;
this . addBpmnPalette ( dir , false ) ;
this . addAWSPalette ( ) ;
this . addAWS3DPalette ( ) ;
this . addLeanMappingPalette ( ) ;
this . addIos7Palette ( ) ;
this . addIosPalette ( ) ;
this . addAndroidPalette ( ) ;
this . addMockupPalette ( ) ;
this . addElectricalPalette ( ) ;
this . addOfficePalette ( ) ;
2016-10-03 16:15:00 +00:00
this . addVeeamPalette ( ) ;
2016-09-06 14:07:11 +00:00
this . addStencilPalette ( 'arrows' , mxResources . get ( 'arrows' ) , dir + '/arrows.xml' ,
';html=1;' + mxConstants . STYLE _VERTICAL _LABEL _POSITION + '=bottom;' + mxConstants . STYLE _VERTICAL _ALIGN + '=top;' + mxConstants . STYLE _STROKEWIDTH + '=2;strokeColor=#000000;' ) ;
this . addArrows2Palette ( ) ;
this . addImagePalette ( 'computer' , 'Clipart / Computer' , imgDir
+ '/lib/clip_art/computers/' , '_128x128.png' , [ 'Antivirus' ,
'Data_Filtering' , 'Database' , 'Database_Add' , 'Database_Minus' ,
'Database_Move_Stack' , 'Database_Remove' , 'Fujitsu_Tablet' ,
'Harddrive' , 'IBM_Tablet' , 'iMac' , 'iPad' , 'Laptop' , 'MacBook' ,
'Mainframe' , 'Monitor' , 'Monitor_Tower' ,
'Monitor_Tower_Behind' , 'Netbook' , 'Network' , 'Network_2' ,
'Printer' , 'Printer_Commercial' , 'Secure_System' , 'Server' ,
'Server_Rack' , 'Server_Rack_Empty' , 'Server_Rack_Partial' ,
'Server_Tower' , 'Software' , 'Stylus' , 'Touch' , 'USB_Hub' ,
'Virtual_Application' , 'Virtual_Machine' , 'Virus' ,
'Workstation' ] , [ 'Antivirus' , 'Data Filtering' , 'Database' ,
'Database Add' , 'Database Minus' , 'Database Move Stack' ,
'Database Remove' , 'Fujitsu Tablet' , 'Harddrive' , 'IBMTablet' ,
'iMac' , 'iPad' , 'Laptop' , 'MacBook' , 'Mainframe' , 'Monitor' ,
'Monitor Tower' , 'Monitor Tower Behind' , 'Netbook' , 'Network' ,
'Network 2' , 'Printer' , 'Printer Commercial' , 'Secure System' ,
'Server' , 'Server Rack' , 'Server Rack Empty' , 'Server Rack Partial' ,
'Server Tower' , 'Software' , 'Stylus' , 'Touch' , 'USB Hub' ,
'Virtual Application' , 'Virtual Machine' , 'Virus' , 'Workstation' ] ) ;
this . addImagePalette ( 'finance' , 'Clipart / Finance' , imgDir
+ '/lib/clip_art/finance/' , '_128x128.png' , [ 'Arrow_Down' ,
'Arrow_Up' , 'Coins' , 'Credit_Card' , 'Dollar' , 'Graph' ,
'Pie_Chart' , 'Piggy_Bank' , 'Safe' , 'Shopping_Cart' ,
'Stock_Down' , 'Stock_Up' ] , [ 'Arrow_Down' , 'Arrow Up' ,
'Coins' , 'Credit Card' , 'Dollar' , 'Graph' , 'Pie Chart' ,
'Piggy Bank' , 'Safe' , 'Shopping Basket' , 'Stock Down' , 'Stock Up' ] ) ;
this . addImagePalette ( 'clipart' , 'Clipart / Various' , imgDir
+ '/lib/clip_art/general/' , '_128x128.png' , [ 'Battery_0' ,
'Battery_100' , 'Battery_50' , 'Battery_75' , 'Battery_allstates' ,
'Bluetooth' , 'Earth_globe' , 'Empty_Folder' , 'Full_Folder' ,
'Gear' , 'Keys' , 'Lock' , 'Mouse_Pointer' , 'Plug' , 'Ships_Wheel' ,
'Star' , 'Tire' ] , [ 'Battery 0%' , 'Battery 100%' , 'Battery 50%' ,
'Battery 75%' , 'Battery' , 'Bluetooth' , 'Globe' ,
'Empty Folder' , 'Full Folder' , 'Gear' , 'Keys' , 'Lock' , 'Mousepointer' ,
'Plug' , 'Ships Wheel' , 'Star' , 'Tire' ] ) ;
this . addImagePalette ( 'networking' , 'Clipart / Networking' , imgDir
+ '/lib/clip_art/networking/' , '_128x128.png' , [ 'Bridge' ,
'Certificate' , 'Certificate_Off' , 'Cloud' , 'Cloud_Computer' ,
'Cloud_Computer_Private' , 'Cloud_Rack' , 'Cloud_Rack_Private' ,
'Cloud_Server' , 'Cloud_Server_Private' , 'Cloud_Storage' ,
'Concentrator' , 'Email' , 'Firewall_02' , 'Firewall' ,
'Firewall-page1' , 'Ip_Camera' , 'Modem' ,
'power_distribution_unit' , 'Print_Server' ,
'Print_Server_Wireless' , 'Repeater' , 'Router' , 'Router_Icon' ,
'Switch' , 'UPS' , 'Wireless_Router' , 'Wireless_Router_N' ] ,
[ 'Bridge' , 'Certificate' , 'Certificate Off' , 'Cloud' , 'Cloud Computer' ,
'Cloud Computer Private' , 'Cloud Rack' , 'Cloud Rack Private' ,
'Cloud Server' , 'Cloud Server Private' , 'Cloud Storage' ,
'Concentrator' , 'Email' , 'Firewall 1' , 'Firewall 2' ,
'Firewall' , 'Camera' , 'Modem' ,
'Power Distribution Unit' , 'Print Server' ,
'Print Server Wireless' , 'Repeater' , 'Router' , 'Router Icon' ,
'Switch' , 'UPS' , 'Wireless Router' , 'Wireless Router N' ] ,
{ 'Wireless_Router' : 'wireless router switch wap wifi access point wlan' ,
'Wireless_Router_N' : 'wireless router switch wap wifi access point wlan' ,
'Router' : 'router switch' ,
'Router_Icon' : 'router switch' } ) ;
this . addImagePalette ( 'people' , 'Clipart / People' , imgDir
+ '/lib/clip_art/people/' , '_128x128.png' , [ 'Suit_Man' ,
'Suit_Man_Black' , 'Suit_Man_Blue' , 'Suit_Man_Green' ,
'Suit_Man_Green_Black' , 'Suit_Woman' , 'Suit_Woman_Black' ,
'Suit_Woman_Blue' , 'Suit_Woman_Green' ,
'Suit_Woman_Green_Black' , 'Construction_Worker_Man' ,
'Construction_Worker_Man_Black' , 'Construction_Worker_Woman' ,
'Construction_Worker_Woman_Black' , 'Doctor_Man' ,
'Doctor_Man_Black' , 'Doctor_Woman' , 'Doctor_Woman_Black' ,
'Farmer_Man' , 'Farmer_Man_Black' , 'Farmer_Woman' ,
'Farmer_Woman_Black' , 'Nurse_Man' , 'Nurse_Man_Black' ,
'Nurse_Man_Green' , 'Nurse_Man_Red' , 'Nurse_Woman' ,
'Nurse_Woman_Black' , 'Nurse_Woman_Green' , 'Nurse_Woman_Red' ,
'Military_Officer' , 'Military_Officer_Black' ,
'Military_Officer_Woman' , 'Military_Officer_Woman_Black' ,
'Pilot_Man' , 'Pilot_Man_Black' , 'Pilot_Woman' ,
'Pilot_Woman_Black' , 'Scientist_Man' , 'Scientist_Man_Black' ,
'Scientist_Woman' , 'Scientist_Woman_Black' , 'Security_Man' ,
'Security_Man_Black' , 'Security_Woman' , 'Security_Woman_Black' ,
'Soldier' , 'Soldier_Black' , 'Tech_Man' , 'Tech_Man_Black' ,
'Telesales_Man' , 'Telesales_Man_Black' , 'Telesales_Woman' ,
'Telesales_Woman_Black' , 'Waiter' , 'Waiter_Black' ,
'Waiter_Woman' , 'Waiter_Woman_Black' , 'Worker_Black' ,
'Worker_Man' , 'Worker_Woman' , 'Worker_Woman_Black' ] ) ;
this . addImagePalette ( 'telco' , 'Clipart / Telecommunication' , imgDir
+ '/lib/clip_art/telecommunication/' , '_128x128.png' , [
'BlackBerry' , 'Cellphone' , 'HTC_smartphone' , 'iPhone' ,
'Palm_Treo' , 'Signal_tower_off' , 'Signal_tower_on' ] ,
[ 'BlackBerry' , 'Cellphone' , 'HTC smartphone' , 'iPhone' ,
'Palm Treo' , 'Signaltower off' , 'Signaltower on' ] ) ;
for ( var i = 0 ; i < signs . length ; i ++ )
{
this . addStencilPalette ( 'signs' + signs [ i ] , 'Signs / ' + signs [ i ] ,
dir + '/signs/' + signs [ i ] . toLowerCase ( ) + '.xml' ,
';html=1;fillColor=#000000;strokeColor=none;verticalLabelPosition=bottom;verticalAlign=top;align=center;' ) ;
}
2017-01-18 07:58:48 +00:00
for ( var i = 0 ; i < gcp . length ; i ++ )
{
this . addStencilPalette ( 'gcp' + gcp [ i ] , 'GCP / ' + gcp [ i ] ,
dir + '/gcp/' + gcp [ i ] . toLowerCase ( ) . replace ( / /g , '_' ) + '.xml' ,
';html=1;fillColor=#4387FD;gradientColor=#4683EA;strokeColor=none;verticalLabelPosition=bottom;verticalAlign=top;align=center;' ) ;
}
2016-09-06 14:07:11 +00:00
for ( var i = 0 ; i < rack . length ; i ++ )
{
if ( rack [ i ] . toLowerCase ( ) === 'general' )
{
this . addRackGeneralPalette ( ) ;
}
else if ( rack [ i ] . toLowerCase ( ) === 'f5' )
{
this . addRackF5Palette ( ) ;
}
else
{
this . addStencilPalette ( 'rack' + rack [ i ] , 'Rack / ' + rack [ i ] ,
dir + '/rack/' + rack [ i ] . toLowerCase ( ) + '.xml' ,
';html=1;labelPosition=right;align=left;spacingLeft=15;dashed=0;shadow=0;fillColor=#ffffff;' ) ;
}
}
for ( var i = 0 ; i < pids . length ; i ++ )
{
if ( pids [ i ] == 'Instruments' )
{
this . addPidInstrumentsPalette ( ) ;
}
else if ( pids [ i ] == 'Misc' )
{
this . addPidMiscPalette ( ) ;
}
else if ( pids [ i ] == 'Valves' )
{
this . addPidValvesPalette ( ) ;
}
else if ( pids [ i ] == 'Compressors' )
{
this . addPidCompressorsPalette ( ) ;
}
else if ( pids [ i ] == 'Engines' )
{
this . addPidEnginesPalette ( ) ;
}
else if ( pids [ i ] == 'Filters' )
{
this . addPidFiltersPalette ( ) ;
}
else if ( pids [ i ] == 'Flow Sensors' )
{
this . addPidFlowSensorsPalette ( ) ;
}
else if ( pids [ i ] == 'Piping' )
{
this . addPidPipingPalette ( ) ;
}
else
{
this . addStencilPalette ( 'pid' + pids [ i ] , 'Proc. Eng. / ' + pids [ i ] ,
dir + '/pid/' + pids [ i ] . toLowerCase ( ) . replace ( ' ' , '_' ) + '.xml' ,
';html=1;align=center;' + mxConstants . STYLE _VERTICAL _LABEL _POSITION + '=bottom;' + mxConstants . STYLE _VERTICAL _ALIGN + '=top;dashed=0;' ) ;
}
}
for ( var i = 0 ; i < sysml . length ; i ++ )
{
if ( sysml [ i ] == 'Model Elements' )
{
this . addSysMLModelElementsPalette ( ) ;
}
else if ( sysml [ i ] == 'Blocks' )
{
this . addSysMLBlocksPalette ( ) ;
}
else if ( sysml [ i ] == 'Ports and Flows' )
{
this . addSysMLPortsAndFlowsPalette ( ) ;
}
else if ( sysml [ i ] == 'Constraint Blocks' )
{
this . addSysMLConstraintBlocksPalette ( ) ;
}
else if ( sysml [ i ] == 'Activities' )
{
this . addSysMLActivitiesPalette ( ) ;
}
else if ( sysml [ i ] == 'Interactions' )
{
this . addSysMLInteractionsPalette ( ) ;
}
else if ( sysml [ i ] == 'State Machines' )
{
this . addSysMLStateMachinesPalette ( ) ;
}
else if ( sysml [ i ] == 'Use Cases' )
{
this . addSysMLUseCasesPalette ( ) ;
}
else if ( sysml [ i ] == 'Allocations' )
{
this . addSysMLAllocationsPalette ( ) ;
}
else if ( sysml [ i ] == 'Requirements' )
{
this . addSysMLRequirementsPalette ( ) ;
}
else if ( sysml [ i ] == 'Profiles' )
{
this . addSysMLProfilesPalette ( ) ;
}
else if ( sysml [ i ] == 'Stereotypes' )
{
this . addSysMLStereotypesPalette ( ) ;
}
}
for ( var i = 0 ; i < eip . length ; i ++ )
{
if ( eip [ i ] == 'Message Construction' )
{
this . addEipMessageConstructionPalette ( ) ;
}
else if ( eip [ i ] == 'Message Routing' )
{
this . addEipMessageRoutingPalette ( ) ;
}
else if ( eip [ i ] == 'Message Transformation' )
{
this . addEipMessageTransformationPalette ( ) ;
}
else if ( eip [ i ] == 'Messaging Channels' )
{
this . addEipMessagingChannelsPalette ( ) ;
}
else if ( eip [ i ] == 'Messaging Endpoints' )
{
this . addEipMessagingEndpointsPalette ( ) ;
}
else if ( eip [ i ] == 'Messaging Systems' )
{
this . addEipMessagingSystemsPalette ( ) ;
}
else if ( eip [ i ] == 'System Management' )
{
this . addEipSystemManagementPalette ( ) ;
}
}
for ( var i = 0 ; i < cisco . length ; i ++ )
{
this . addStencilPalette ( 'cisco' + cisco [ i ] , 'Cisco / ' + cisco [ i ] ,
dir + '/cisco/' + cisco [ i ] . toLowerCase ( ) . replace ( / /g , '_' ) + '.xml' ,
';html=1;dashed=0;fillColor=#036897;strokeColor=#ffffff;strokeWidth=2;verticalLabelPosition=bottom;verticalAlign=top' , null , null , 1.6 ) ;
}
this . addFloorplanPalette ( ) ;
this . addBootstrapPalette ( ) ;
for ( var i = 0 ; i < gmdl . length ; i ++ )
{
if ( gmdl [ i ] == 'Bottom Navigation' )
{
this . addGMDLBottomNavigationPalette ( ) ;
}
else if ( gmdl [ i ] == 'Bottom Sheets' )
{
this . addGMDLBottomSheetsPalette ( ) ;
}
else if ( gmdl [ i ] == 'Buttons' )
{
this . addGMDLButtonsPalette ( ) ;
}
else if ( gmdl [ i ] == 'Cards' )
{
this . addGMDLCardsPalette ( ) ;
}
else if ( gmdl [ i ] == 'Chips' )
{
this . addGMDLChipsPalette ( ) ;
}
else if ( gmdl [ i ] == 'Dialogs' )
{
this . addGMDLDialogsPalette ( ) ;
}
else if ( gmdl [ i ] == 'Dividers' )
{
this . addGMDLDividersPalette ( ) ;
}
else if ( gmdl [ i ] == 'Grid Lists' )
{
this . addGMDLGridListsPalette ( ) ;
}
else if ( gmdl [ i ] == 'Icons' )
{
this . addGMDLIconsPalette ( ) ;
}
else if ( gmdl [ i ] == 'Lists' )
{
this . addGMDLListsPalette ( ) ;
}
else if ( gmdl [ i ] == 'Menus' )
{
this . addGMDLMenusPalette ( ) ;
}
else if ( gmdl [ i ] == 'Misc' )
{
this . addGMDLMiscPalette ( ) ;
}
else if ( gmdl [ i ] == 'Pickers' )
{
this . addGMDLPickersPalette ( ) ;
}
else if ( gmdl [ i ] == 'Selection Controls' )
{
this . addGMDLSelectionControlsPalette ( ) ;
}
else if ( gmdl [ i ] == 'Sliders' )
{
this . addGMDLSlidersPalette ( ) ;
}
else if ( gmdl [ i ] == 'Steppers' )
{
this . addGMDLSteppersPalette ( ) ;
}
else if ( gmdl [ i ] == 'Tabs' )
{
this . addGMDLTabsPalette ( ) ;
}
else if ( gmdl [ i ] == 'Text Fields' )
{
this . addGMDLTextFieldsPalette ( ) ;
}
}
this . addCabinetsPalette ( ) ;
this . addArchimate3Palette ( ) ;
this . addArchiMatePalette ( ) ;
2017-01-18 07:58:48 +00:00
this . addWebIconsPalette ( ) ;
this . addWebLogosPalette ( ) ;
2016-09-06 14:07:11 +00:00
// LATER: Check if conflicts with restore libs after loading file
this . showEntries ( ) ;
} ;
/ * *
* Overridden to manually create search index for stencil files which are not pre - loaded
* and no entries are created programmatically .
* /
if ( urlParams [ 'createindex' ] == '1' )
{
var sidebarAddStencilPalette = Sidebar . prototype . addStencilPalette ;
Sidebar . prototype . addStencilPalette = function ( id , title , stencilFile , style , ignore , onInit , scale , tags )
{
sidebarAddStencilPalette . apply ( this , arguments ) ;
scale = ( scale != null ) ? scale : 1 ;
// Used for creating index
mxStencilRegistry . loadStencilSet ( stencilFile , mxUtils . bind ( this , function ( packageName , stencilName , displayName , w , h )
{
if ( ignore == null || mxUtils . indexOf ( ignore , stencilName ) < 0 )
{
var tmpTags = ( tags != null ) ? tags [ stencilName ] : null ;
mxLog . debug ( '<shape style="shape=' + packageName + stencilName + style + '" ' +
'w="' + Math . round ( w * scale ) + '" h="' + Math . round ( h * scale ) + '"' +
( ( tmpTags != null ) ? ' tags="' + tmpTags + '"' : '' ) + '/>' ) ;
}
} ) , true ) ;
} ;
}
/ * *
2016-09-21 21:13:50 +00:00
* Adds server icon results to local search results
2016-09-06 14:07:11 +00:00
* /
var sidebarSearchEntries = Sidebar . prototype . searchEntries ;
Sidebar . prototype . searchEntries = function ( searchTerms , count , page , success , error )
{
var succ = success ;
// Logs search terms for improving search results
if ( this . editorUi . enableLogging && ! this . editorUi . isOffline ( ) && page == 0 )
{
var img = new Image ( ) ;
2016-10-27 15:53:53 +00:00
var logDomain = window . DRAWIO _LOG _URL != null ? window . DRAWIO _LOG _URL : '' ;
img . src = logDomain + '/log?severity=CONFIG&msg=shapesearch:' + encodeURIComponent ( searchTerms ) + '&v=' + encodeURIComponent ( EditorUi . VERSION ) ;
2016-09-06 14:07:11 +00:00
}
2016-09-20 12:35:42 +00:00
success = mxUtils . bind ( this , function ( results , len , more , terms )
2016-09-06 14:07:11 +00:00
{
if ( ! this . editorUi . isOffline ( ) && results . length <= count / 4 )
{
var pg = page - Math . ceil ( ( len - count / 4 ) / count ) ;
2016-11-04 22:16:17 +00:00
mxUtils . get ( ICONSEARCH _PATH + '?v=2&q=' + encodeURIComponent ( searchTerms ) +
'&p=' + pg + '&c=' + count , mxUtils . bind ( this , function ( req )
2016-09-06 14:07:11 +00:00
{
2016-11-04 22:16:17 +00:00
try
2016-09-06 14:07:11 +00:00
{
2016-11-04 22:16:17 +00:00
if ( req . getStatus ( ) >= 200 && req . getStatus ( ) <= 299 )
2016-09-06 14:07:11 +00:00
{
2016-11-04 22:16:17 +00:00
var res = JSON . parse ( req . getText ( ) ) ;
for ( var i = 0 ; i < res . icons . length ; i ++ )
2016-09-06 14:07:11 +00:00
{
2016-11-04 22:16:17 +00:00
var sizes = res . icons [ i ] . raster _sizes ;
var index = sizes . length - 1 ;
while ( index > 0 && sizes [ index ] . size > 128 )
2016-09-06 14:07:11 +00:00
{
2016-11-04 22:16:17 +00:00
index -- ;
}
var size = sizes [ index ] . size ;
var url = sizes [ index ] . formats [ 0 ] . preview _url ;
if ( size != null && url != null )
{
( mxUtils . bind ( this , function ( s , u )
{
results . push ( mxUtils . bind ( this , function ( )
{
return this . createVertexTemplate ( 'shape=image;html=1;verticalAlign=top;' +
'verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;imageAspect=0;' +
'aspect=fixed;image=' + u , s , s , '' ) ;
} ) ) ;
} ) ) ( size , url ) ;
}
}
succ ( results , ( page - 1 ) * count + results . length , res . icons . length == count , terms ) ;
}
else
{
succ ( results , len , false , terms ) ;
this . editorUi . handleError ( { message : mxResources . get ( 'unknownError' ) } ) ;
2016-09-06 14:07:11 +00:00
}
}
2016-11-04 22:16:17 +00:00
catch ( e )
{
succ ( results , len , false , terms ) ;
this . editorUi . handleError ( e ) ;
}
2016-09-06 14:07:11 +00:00
} ,
function ( )
{
2016-09-20 12:35:42 +00:00
succ ( results , len , false , terms ) ;
2016-09-06 14:07:11 +00:00
} ) ) ;
}
else
{
2016-09-20 12:35:42 +00:00
succ ( results , len , more || ! this . editorUi . isOffline ( ) , terms ) ;
2016-09-06 14:07:11 +00:00
}
} ) ;
sidebarSearchEntries . apply ( this , arguments ) ;
} ;
/ * *
* Adds a click handler for inserting the cell as target for dangling edge .
* /
var sidebarItemClicked = Sidebar . prototype . itemClicked ;
Sidebar . prototype . itemClicked = function ( cells , ds , evt )
{
var graph = this . editorUi . editor . graph ;
var handled = false ;
if ( cells != null && graph . getSelectionCount ( ) == 1 && graph . getModel ( ) . isVertex ( cells [ 0 ] ) )
{
var target = graph . cloneCells ( cells ) [ 0 ] ;
// Inserts cell as target of selected edge if not connected
if ( graph . getModel ( ) . isEdge ( graph . getSelectionCell ( ) ) && graph . getModel ( ) . getTerminal ( graph . getSelectionCell ( ) , false ) == null &&
graph . getModel ( ) . isVertex ( target ) )
{
graph . getModel ( ) . beginUpdate ( ) ;
try
{
var edgeState = graph . view . getState ( graph . getSelectionCell ( ) ) ;
if ( edgeState != null )
{
var tr = graph . view . translate ;
var s = graph . view . scale ;
var pt = edgeState . absolutePoints [ edgeState . absolutePoints . length - 1 ] ;
target . geometry . x = pt . x / s - tr . x - target . geometry . width / 2 ;
target . geometry . y = pt . y / s - tr . y - target . geometry . height / 2 ;
}
graph . addCell ( target ) ;
graph . getModel ( ) . setTerminal ( graph . getSelectionCell ( ) , target , false ) ;
}
finally
{
graph . getModel ( ) . endUpdate ( ) ;
}
graph . scrollCellToVisible ( target ) ;
graph . setSelectionCell ( target ) ;
handled = true ;
}
}
if ( ! handled )
{
sidebarItemClicked . apply ( this , arguments ) ;
}
} ;
} ) ( ) ;