@grethel-labs/excaliplant 0.19.4 → 0.19.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/README.md +2 -2
- package/package.json +1 -1
- package/src/diagrams/deployment/tests/output/all-shapes.excalidraw.json +9 -5
- package/src/diagrams/deployment/tests/output/all-shapes.svg +1 -1
- package/src/diagrams/deployment/tests/output/arrow-styles.excalidraw.json +6 -4
- package/src/diagrams/deployment/tests/output/arrow-styles.svg +2 -2
- package/src/diagrams/deployment/tests/output/official-elements.excalidraw.json +9 -5
- package/src/diagrams/deployment/tests/output/official-elements.svg +1 -1
- package/src/diagrams/use-case/layout.mjs +3 -1
- package/src/general/layout/sizing.mjs +13 -0
- package/src/general/render/excalidraw.mjs +517 -190
- package/src/general/style/style.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.19.5] - 2026-06-30
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- Edge and endpoint label collision handling now uses iterative overlap resolution:
|
|
14
|
+
1. labels are shifted first along their edge-derived normal vector,
|
|
15
|
+
respecting a minimum 2px gap, with recursive/iterated pair resolution,
|
|
16
|
+
2. if movement alone cannot clear remaining collisions, labels are shrunk
|
|
17
|
+
and the process repeats.
|
|
18
|
+
- Endpoint labels are now kept outside element borders with a more robust inward
|
|
19
|
+
offset, and edge/endpoint labels in collisions are stabilized via the new
|
|
20
|
+
overlap-resolution loop so 2px spacing is retained under dense routing.
|
|
21
|
+
- Use-case and cloud node titles render inside a reduced-width curved title band,
|
|
22
|
+
preventing text from spilling beyond rounded outline boundaries.
|
|
23
|
+
|
|
9
24
|
### Added
|
|
10
25
|
|
|
11
26
|
- Graph edge-label chips now inherit the rendered arrow colour by default and
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://nodejs.org)
|
|
8
8
|
[](./LICENSE)
|
|
9
9
|
|
|
10
|
-
> PlantUML → ELK layout → Excalidraw renderer with a plugin-based parser. · **v0.19.
|
|
10
|
+
> PlantUML → ELK layout → Excalidraw renderer with a plugin-based parser. · **v0.19.5** · 265 tests · MIT
|
|
11
11
|
|
|
12
12
|
`@grethel-labs/excaliplant` takes PlantUML source, runs it through a plugin-based
|
|
13
13
|
parser, lays it out with [ELK](https://github.com/kieler/elkjs), and
|
|
@@ -294,7 +294,7 @@ presentation, link, text-markup, skinparam, and `<style>` handling.
|
|
|
294
294
|
npm test
|
|
295
295
|
```
|
|
296
296
|
|
|
297
|
-
Ships with **
|
|
297
|
+
Ships with **265 tests** across functional, edge-case,
|
|
298
298
|
security (XSS / ReDoS / prototype-pollution), and self-introspection
|
|
299
299
|
suites.
|
|
300
300
|
|
package/package.json
CHANGED
|
@@ -477,9 +477,9 @@
|
|
|
477
477
|
"link": null,
|
|
478
478
|
"locked": false,
|
|
479
479
|
"type": "text",
|
|
480
|
-
"x":
|
|
481
|
-
"y":
|
|
482
|
-
"width":
|
|
480
|
+
"x": 99,
|
|
481
|
+
"y": 759.25,
|
|
482
|
+
"width": 138,
|
|
483
483
|
"height": 22.5,
|
|
484
484
|
"strokeColor": "#549523",
|
|
485
485
|
"backgroundColor": "transparent",
|
|
@@ -488,10 +488,14 @@
|
|
|
488
488
|
"fontSize": 18,
|
|
489
489
|
"fontFamily": 5,
|
|
490
490
|
"textAlign": "center",
|
|
491
|
-
"verticalAlign": "
|
|
491
|
+
"verticalAlign": "middle",
|
|
492
492
|
"baseline": 15,
|
|
493
493
|
"containerId": null,
|
|
494
|
-
"lineHeight": 1.25
|
|
494
|
+
"lineHeight": 1.25,
|
|
495
|
+
"customData": {
|
|
496
|
+
"role": "cloudTitleText",
|
|
497
|
+
"boxId": "AWS"
|
|
498
|
+
}
|
|
495
499
|
},
|
|
496
500
|
{
|
|
497
501
|
"id": "el_e_43t40i",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<ellipse cx="168" cy="774.1" rx="110" ry="34" fill="#ffffff" stroke="none"/><path d="M214.03974228726904 742.1306162069615 C227.65441339623996 743.4875534219855, 240.7371504879867 746.670272827096, 250.77986106459582 750.1763934811096 C260.82257164120495 753.6825141351231, 269.7135866438001 758.3593735282266, 274.2960057469237 763.1673401310426 C278.8784248500473 767.9753067338586, 280.1280328454835 774.2589250408298, 278.27437568333744 779.0241930980054 C276.42071852119136 783.789461155181, 271.1254229679098 787.7314707944145, 263.1740627740473 791.7589484740963 C255.22270258018477 795.7864261537782, 242.77740909121218 800.5439310711199, 230.56621452016242 803.1890591760962 C218.35501994911266 805.8341872810724, 204.36447369960706 806.9123688683674, 189.9068953477487 807.6297171039538 C175.44931699589034 808.3470653395402, 158.4623743341654 808.4747797421504, 143.82074440901232 807.4931485896146 C129.17911448385925 806.5115174370789, 113.971070219168 804.4633018045212, 102.05711579683027 801.7399301887393 C90.14316137449255 799.0165585729575, 79.62519546588766 795.3703968540668, 72.33701787498595 791.1529188949236 C65.04884028408424 786.9354409357803, 59.89048573616625 781.1000809114983, 58.32805025142001 776.4350624338797 C56.76561476667377 771.7700439562611, 58.14146675025167 767.6266857069371, 62.96240496650853 763.1628080292124 C67.78334318276538 758.6989303514878, 76.96708029530313 753.2111486763102, 87.25367954896114 749.6517963675318 C97.54027880261916 746.0924440587534, 111.03783213992648 743.5770333365207, 124.68200048845662 741.8066941765416 C138.32616883698677 740.0363550165624, 152.71632850084032 738.5425625904879, 169.118689640142 739.0297614076571 C185.5210507794437 739.5169602248263, 212.75230781953113 743.5400748427771, 223.09616732426673 744.7298870795571 C233.44002682900233 745.9196993163371, 232.02900779824958 745.8758092404779, 231.18184666855566 746.1686348283367 M170.76580920124619 738.0701252863009 C185.36483602931415 737.4935634024007, 203.53600797319646 739.6978131936789, 217.34692055434232 741.7727059947313 C231.15783313548818 743.8475987957836, 244.35291931377387 746.655675567563, 253.63128468812135 750.519482092615 C262.9096500624688 754.3832886176671, 269.114965458289 760.2013412436994, 273.01711280042724 764.9555451450434 C276.91926014256546 769.7097490463874, 278.9706016729615 774.4070333844766, 277.04416874095085 779.0447055006791 C275.1177358089402 783.6823776168817, 269.2610954487938 788.8801448944115, 261.4585152083635 792.781577842259 C253.65593496793323 796.6830107901066, 242.72227511192298 800.0209104145324, 230.22868729836915 802.4533031877643 C217.73509948481532 804.8856959609961, 201.11055698607487 806.2790027111139, 186.4969883270405 807.3759344816506 C171.88341966800613 808.4728662521873, 156.80440588592649 809.8349668631155, 142.54727534416284 809.0348938109846 C128.2901448023992 808.2348207588537, 113.0230860628055 805.6454018800976, 100.9542050764587 802.5754961688652 C88.88532409011191 799.5055904576329, 77.37073368175484 794.8143586894836, 70.13398942608201 790.6154595435911 C62.897245170409185 786.4165603976986, 58.44398540312005 782.283472200546, 57.533739542421756 777.3821012935105 C56.62349368172346 772.4807303864749, 59.23040821395782 765.8646876773801, 64.67251426189222 761.2072341013777 C70.11462030982662 756.5497805253754, 79.9746934766218 752.6666585270899, 90.18637583002813 749.4373798374961 C100.39805818343446 746.2081011479023, 112.10869747922868 743.4842777876877, 125.94260838233018 741.8315619638149 C139.77651928543168 740.1788461399422, 165.67640705810126 739.699281873641, 173.1898412486371 739.5210848942597 C180.70327543917293 739.3428879148785, 171.54030041647619 740.1235950815599, 171.02321352554523 740.7623800875273" fill="none" stroke="#549523" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
16
16
|
<ellipse cx="105" cy="744.5" rx="14" ry="14" fill="#ffffff" stroke="none"/><path d="M109.2411601429951 730.3074830111176 C112.16011159676317 730.8619585138863, 114.78073093642385 732.9411491911164, 116.233878216811 735.5333958504846 C117.68702549719814 738.1256425098527, 118.1128685484947 742.5296029812629, 117.96004382531791 745.8609629673267 C117.80721910214112 749.1923229533905, 117.13579880811763 753.4105498370546, 115.31692987775024 755.5215557668674 C113.49806094738285 757.6325616966802, 109.91065040066437 758.5511748509851, 107.04683024311358 758.5269985462033 C104.18301008556278 758.5028222414215, 100.77634436525844 757.0085053504608, 98.13400893244548 755.3764979381765 C95.49167349963253 753.7444905258922, 92.26212293846224 751.6896560047267, 91.19281764623588 748.7349540724974 C90.12351235400952 745.7802521402682, 90.56131017770184 740.3464530554614, 91.71817717908729 737.648286344801 C92.87504418047274 734.9501196341406, 94.66088111414125 733.6114077700171, 98.13401965454862 732.5459538085352 C101.607158194956 731.4804998470532, 109.74840130669821 731.0941804583314, 112.55700842153153 731.2555625759094 C115.36561553636486 731.4169446934874, 115.21711132096611 733.1278695528441, 114.98566234354851 733.5142465140033 M104.83711789132957 729.260086805948 C107.5953065681739 729.2113563354712, 112.5534016502069 730.7611541144878, 114.69317405743826 732.8528589351038 C116.83294646466962 734.9445637557197, 117.38946104035358 738.7177530184842, 117.67575233471774 741.810315729644 C117.9620436290819 744.9028784408038, 117.78326515477981 748.8846949980707, 116.41092182362326 751.408235202062 C115.0385784924667 753.9317754060532, 112.01881272285651 755.8934903397854, 109.44169234777843 756.951556953592 C106.86457197270035 758.0096235673985, 103.47825391377626 758.6869575026421, 100.94819957315475 757.7566348849012 C98.41814523253325 756.8263122671603, 95.93206569232382 754.0969941103208, 94.26136630404937 751.3696212471463 C92.59066691577493 748.6422483839717, 90.59005252583687 744.6308323606822, 90.92400324350811 741.3923977058541 C91.25795396117935 738.153963051026, 93.88361976150473 733.7733478758985, 96.26507061007683 731.9390133181777 C98.64652145864893 730.1046787604569, 103.80670192496845 730.8539890810434, 105.2127083349407 730.3863903595293 C106.61871474491295 729.9187916380151, 104.84279772348154 729.1237900988623, 104.70110906991033 729.133420989093" fill="none" stroke="#549523" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
17
17
|
<ellipse cx="193" cy="748.5" rx="14" ry="14" fill="#ffffff" stroke="none"/><path d="M197.31316498384274 735.151136983601 C200.07731253827896 735.5684424416032, 202.67843666490478 738.0270354223247, 204.1360587087227 740.4237584020613 C205.5936807525406 742.8204813817978, 206.22635971173287 746.4433126435858, 206.05889724675015 749.5314748620202 C205.89143478176743 752.6196370804546, 205.18027097964077 756.7627950358167, 203.1312839188264 758.9527317126677 C201.08229685801203 761.1426683895188, 196.74086534444336 762.6488446090817, 193.7649748818639 762.6710949231265 C190.78908441928445 762.6933452371712, 187.49160393744327 760.8748773561806, 185.27594114334974 759.0862335969364 C183.0602783492562 757.2975898376922, 181.16191774949093 754.6430819023301, 180.47099811730277 751.9392323676608 C179.78007848511461 749.2353828329915, 179.99448114696486 745.5508583535185, 181.1304233502208 742.8631363889208 C182.26636555347676 740.1754144243231, 184.32832028490776 736.8031453469124, 187.28665133683842 735.8129005800744 C190.24498238876907 734.8226558132363, 196.80900135666195 736.5459930786251, 198.88040966180466 736.9216677878927 C200.95181796694737 737.2973424971603, 199.98554451108345 737.9570256007056, 199.7151011676947 738.0669488356804 M196.594379137232 736.8444890086442 C199.29350085229387 737.4371306323558, 204.01838695735515 739.3142917879906, 205.42415596477272 741.8043686449621 C206.8299249721903 744.2944455019336, 205.3982110713735 748.9591509694352, 205.02899318173746 751.7849501504733 C204.65977529210141 754.6107493315113, 204.9130121093067 757.1652437526068, 203.20884862695644 758.7591637311907 C201.50468514460619 760.3530837097746, 197.858153734316 761.1909352383159, 194.804012287636 761.3484700219768 C191.749870840956 761.5060048056378, 187.429631633467 761.4527793713467, 184.88399994687643 759.7043724331564 C182.33836826028585 757.9559654949662, 180.16392434508734 753.7768246783056, 179.5302221680925 750.8580283928356 C178.89651999109768 747.9392321073657, 179.54831656945385 744.779624738488, 181.08178688490742 742.1915947203369 C182.615257200361 739.6035647021857, 186.2516956875282 736.4858076889328, 188.7310440608139 735.3298482839289 C191.2103924340996 734.1738888789249, 194.34037020906604 735.2918868711214, 195.95787712462155 735.2558382903129 C197.57538404017706 735.2197897095044, 198.44174942764218 734.6322135476734, 198.43608555414698 735.1135567990782" fill="none" stroke="#549523" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
18
|
-
<text x="168" y="
|
|
18
|
+
<text x="168" y="777.25" fill="#549523" font-size="18" text-anchor="middle"><tspan x="168" dy="0">AWS</tspan></text>
|
|
19
19
|
<path d="M65.38,854.6 h205.24 a7.38,7.38 0 0 1 7.38,7.38 v59.04 a7.38,7.38 0 0 1 -7.38,7.38 h-205.24 a7.38,7.38 0 0 1 -7.38,-7.38 v-59.04 a7.38,7.38 0 0 1 7.38,-7.38 z" fill="#ffffff" stroke="none"/><path d="M64.0076354168085 853.2735462675146 C131.346930947536 853.4815261823034, 195.26750266256684 852.0873408539293, 271.1583988151186 855.091737708537 M64.49696225286566 853.9276176461536 C141.01041191979022 854.610147229442, 215.39668674632776 854.3317789657851, 269.8122697059661 854.6170967530797 M270.62 854.6 C273.9088145853972 855.0606176801026, 276.4760362319648 858.6490917203928, 277.97566882893443 863.4900414939225 M270.25466910645366 855.7124376244843 C273.928158063071 854.3896284734831, 279.95604349914936 858.4798859860728, 276.2480572039261 860.349290718995 M278.2929194159806 861.493128798455 C276.44989652538004 874.5199508598447, 278.2729588260621 889.9472055079043, 279.1677459664643 921.2855471973121 M277.6857069339603 862.7394091985375 C277.60204284817576 875.3737327603549, 277.4764928761184 887.4343353901654, 277.10721375606954 921.3352192328125 M278 921.02 C277.2312362603843 924.1013864653205, 274.3936949135756 926.5189391799271, 270.51517418667675 928.3531650729477 M277.31315426155925 922.2893597264588 C278.6066989773884 922.862198971214, 272.9741668943336 928.6819223498925, 272.07285927597434 927.770110557042 M271.6022095686223 926.6717893658363 C193.4980607184701 929.3815629645868, 113.09054353991819 930.1535058073392, 65.92768837279513 928.1230324417381 M270.8365997779755 927.8605780792592 C219.45933167114927 929.3869494422918, 167.7123460534126 928.5870026246695, 66.26892078416407 927.8556730555385 M65.38 928.4 C60.07750742267615 929.6890340276062, 56.9615465812385 925.9108844177817, 58.74233762547373 922.3995192427933 M67.35349671646952 927.0600007005036 C61.13170977085626 926.4905830299482, 58.73343862835317 927.3118906900306, 59.0278861099854 922.5104151057824 M56.12492157891392 921.109535754174 C60.544609517732255 898.7290346900224, 60.183544010797135 876.0521888687908, 58.40048970654606 862.0186246852577 M58.88283832930028 920.5089936540276 C57.42496580829619 902.9388326316923, 58.267334232234944 883.8581830992251, 58.10653783939778 862.6680455706269 M57.99999999999999 861.98 C59.71142129227518 857.9213379619623, 59.53713445495612 855.5455092139542, 66.67547945782542 852.6889086909592 M58.675266783684485 861.7829152341187 C57.479044210351994 859.0472164478133, 61.81752496808565 856.0759684896096, 63.67945606533438 854.6437297558413 M65.38 854.6 C65.38 854.6, 65.38 854.6, 65.38 854.6 M65.38 854.6 C65.38 854.6, 65.38 854.6, 65.38 854.6" fill="none" stroke="#957423" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
20
20
|
<ellipse cx="168" cy="854.6" rx="110" ry="8.1" fill="#ffffff" stroke="none"/><path d="M125.53357444736204 847.9304086567957 C137.64543848982558 847.3067175020678, 154.07651730307637 846.4035069832577, 168.54421716373747 846.2346856059859 C183.01191702439857 846.0658642287141, 198.8321097272846 846.4529954927476, 212.33977361132867 846.9174803931647 C225.84743749537273 847.3819652935819, 239.79138611394202 848.2562862461584, 249.59020046800188 849.0215950084887 C259.38901482206177 849.786903770819, 266.962632753532 850.552799769515, 271.13265973568787 851.5093329671463 C275.30268671784376 852.4658661647776, 276.3502347503923 853.6623113733506, 274.61036236093724 854.7607941942765 C272.8704899714822 855.8592770152025, 268.00050132803335 857.0045133284772, 260.6934253989575 858.100229892702 C253.38634946988168 859.1959464569269, 242.5382879010232 860.6367603624956, 230.76790678648214 861.3350935796254 C218.99752567194108 862.0334267967553, 204.4745864140671 862.125998453329, 190.07113871171114 862.2902291954815 C175.6676910093552 862.454459937634, 158.66249347776846 862.404063262957, 144.34722057234646 862.3204780325409 C130.03194766692445 862.2368928021248, 116.03524935135398 862.258410094814, 104.17950127917904 861.7887178129849 C92.32375320700409 861.3190255311558, 80.49320760048025 860.44907143164, 73.21273213929675 859.5023243415664 C65.93225667811325 858.5555772514927, 61.838480153098274 857.4496303959531, 60.49664851207808 856.108235272543 C59.15481687105789 854.7668401491328, 60.31442563357605 852.4840398430998, 65.16174229317559 851.453953601105 C70.00905895277513 850.4238673591102, 77.20724364177106 850.6014806351573, 89.58054846967535 849.9277178205743 C101.95385329757964 849.2539550059914, 128.7096085673399 847.9368483073081, 139.40157126060137 847.4113767136073 C150.09353395386285 846.8859051199065, 153.16546334900133 846.9067805928911, 153.73232462924418 846.77488825837 M207.94870099172215 846.3323949151288 C221.4789758284504 846.1651601485585, 234.42370770847634 846.4639192303697, 244.54758607356797 847.4973606375531 C254.6714644386596 848.5308020447366, 263.4941241450986 851.3835321462791, 268.69197118227186 852.5330433582294 C273.8898182194451 853.6825545701797, 276.6455276031084 853.4725847714019, 275.7346682966074 854.3944279092547 C274.82380899010644 855.3162710471074, 269.80316841183867 856.7970328653557, 263.22681534326586 858.0641021853457 C256.65046227469304 859.3311715053358, 247.75581269678315 861.080568404862, 236.27654988517037 861.9968438291945 C224.79728707355758 862.913119253527, 208.6332509460769 863.6504067410833, 194.35123847358915 863.5617547313408 C180.06922600110138 863.4731027215983, 164.85389950985925 861.8687196121286, 150.58447505024378 861.4649317707393 C136.31505059062832 861.06114392935, 121.16502679614732 861.5345528212886, 108.73469171589635 861.1390276830048 C96.30435663564538 860.743502544721, 83.96857481771289 859.7461708609974, 76.00246456873799 859.0917809410363 C68.03635431976309 858.4373910210752, 63.162619256069824 858.2206133031119, 60.938030222046976 857.2126881632385 C58.71344118802413 856.204763023365, 58.725807167000504 854.5746462504208, 62.6549303646009 853.0442301017954 C66.58405356220129 851.51381395317, 75.23009841044475 849.0779672889225, 84.51276940764934 848.0301912714863 C93.79544040485393 846.98241525405, 105.39307928261536 846.8943200022034, 118.3509563478284 846.7575739971776 C131.30883341304144 846.6208279921518, 147.6878198925794 847.3282646557894, 162.26003179892754 847.2097152413314 C176.8322437052757 847.0911658268734, 198.30684192256007 845.8812110895078, 205.78422778591732 846.0462775104295 C213.26161364927458 846.2113439313512, 207.3767293136766 848.0642345680128, 207.1243469790711 848.2001137668617" fill="none" stroke="#957423" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
21
21
|
<path d="M205.72876629898332 920.0611365256166 C219.6681515022689 920.1517686630159, 233.11970187678062 921.4689322959058, 244.01535100918204 922.3869849374 C254.91100014158346 923.3050375788943, 265.17716619275876 924.5148640655871, 271.1026610933919 925.5694523745817 C277.028155994025 926.6240406835764, 279.8884726666497 927.65720691895, 279.5683204129807 928.7145147913682 C279.2481681593117 929.7718226637863, 275.47802250147 930.7458711945799, 269.18174757137774 931.9132996090908 C262.8854726412855 933.0807280236018, 253.38283360579817 934.9340659490656, 241.79067083242734 935.7190852784341 C230.1985080590565 936.5041046078027, 214.41066178354936 936.4909556120003, 199.62877093115267 936.6234155853019 C184.846880078756 936.7558755586035, 168.00739843634443 936.601246306727, 153.09932571804725 936.5138451182435 C138.19125299975008 936.4264439297599, 123.08654715935549 936.802590032964, 110.18033462136955 936.0990084544009 C97.27412208338362 935.3954268758378, 84.2826354825463 933.3833497945458, 75.66205049013166 932.2923556468648 C67.04146549771703 931.2013614991839, 61.1990551610698 930.4034560415432, 58.456824666881744 929.553043568315 C55.71459417269369 928.7026310950869, 55.88845443971519 928.341952703641, 59.20866752500332 927.189880807496 C62.52888061029145 926.037808911351, 69.09692870065034 923.7150768245069, 78.37810317861053 922.6406121914454 C87.65927765657072 921.5661475583838, 101.39549125258101 921.0138108149627, 114.8957143927645 920.7430930091268 C128.39593753294798 920.472375203291, 142.69290879358576 920.9218815851581, 159.37944201971146 921.0163053564306 C176.06597524583717 921.1107291277032, 203.8568293563091 921.3867213459486, 215.01491374951874 921.309635636762 C226.17299814272837 921.2325499275754, 226.98851571376974 920.3664098002325, 226.32794837896924 920.5537911013109 M189.05614683485075 919.5624547195246 C203.61253930812634 919.7969658138848, 219.80342421400746 922.0800547914578, 232.247100947182 922.9290937344634 C244.69077768035652 923.7781326774691, 255.77632940970716 923.9182286462278, 263.71820723389783 924.6566883775586 C271.6600850580885 925.3951481088893, 277.86866582297415 926.2305222626608, 279.898367892326 927.3598521224479 C281.92806996167786 928.4891819822351, 280.2098770090948 930.4785830649694, 275.896419650009 931.4326675362817 C271.58296229092326 932.3867520075939, 263.88277473295426 932.0930952951219, 254.0176237378116 933.084358950322 C244.15247274266892 934.0756226055221, 230.55345717567207 937.0159570174819, 216.70551367915309 937.3802494674821 C202.8575701826341 937.7445419174824, 186.52453392485768 935.2354524558398, 170.92996275869774 935.2701136503235 C155.3353915925378 935.3047748448073, 137.29971602429012 937.797531228439, 123.13808668219343 937.5882166343848 C108.97645734009674 937.3789020403307, 96.33231877915871 935.2804373809961, 85.9601867061176 934.0142260859985 C75.58805463307648 932.748014791001, 65.68487936912874 931.2262682706014, 60.90529424394671 929.9909488643993 C56.12570911876468 928.7556294581973, 55.84246037871937 927.5304905734431, 57.28267595502541 926.6023096487866 C58.72289153133145 925.67412872413, 62.395636663185115 925.2977102845456, 69.54658770178295 924.4218633164604 C76.69753874038079 923.5460163483752, 87.74524136091583 922.1778285690555, 100.18838218661246 921.3472278402754 C112.63152301230909 920.5166271114954, 129.3907299669046 919.7001067890745, 144.20543265596274 919.4382589437802 C159.0201353450209 919.1764110984858, 181.480728526659 919.8216175173711, 189.0765983209614 919.7761407685091 C196.67246811526383 919.7306640196471, 189.96191634142298 919.1359778357578, 189.78065142177715 919.1653984506079" fill="none" stroke="#957423" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
@@ -407,8 +407,8 @@
|
|
|
407
407
|
"link": null,
|
|
408
408
|
"locked": false,
|
|
409
409
|
"type": "rectangle",
|
|
410
|
-
"x":
|
|
411
|
-
"y":
|
|
410
|
+
"x": 315.5,
|
|
411
|
+
"y": 123,
|
|
412
412
|
"width": 42.6,
|
|
413
413
|
"height": 16.5,
|
|
414
414
|
"strokeColor": "#953a23",
|
|
@@ -416,6 +416,7 @@
|
|
|
416
416
|
"customData": {
|
|
417
417
|
"role": "edgeLabelChip",
|
|
418
418
|
"connectionId": "A->B#3",
|
|
419
|
+
"endpoint": null,
|
|
419
420
|
"lineColor": "#953a23",
|
|
420
421
|
"fittedFontSize": 10,
|
|
421
422
|
"avoidedOverlap": false
|
|
@@ -441,8 +442,8 @@
|
|
|
441
442
|
"link": null,
|
|
442
443
|
"locked": false,
|
|
443
444
|
"type": "text",
|
|
444
|
-
"x":
|
|
445
|
-
"y":
|
|
445
|
+
"x": 321.5,
|
|
446
|
+
"y": 125,
|
|
446
447
|
"width": 30.6,
|
|
447
448
|
"height": 12.5,
|
|
448
449
|
"strokeColor": "#ffffff",
|
|
@@ -459,6 +460,7 @@
|
|
|
459
460
|
"customData": {
|
|
460
461
|
"role": "edgeLabelText",
|
|
461
462
|
"connectionId": "A->B#3",
|
|
463
|
+
"endpoint": null,
|
|
462
464
|
"lineColor": "#953a23",
|
|
463
465
|
"fittedFontSize": 10,
|
|
464
466
|
"measuredWidth": 30.6,
|
|
@@ -13,6 +13,6 @@
|
|
|
13
13
|
<path d="M278 164 C305.0585711230524 164, 332.1171422461048 164, 353 164" fill="none" stroke="#953a23" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="8 4"/><polyline points="278,164 353,164" fill="none" stroke="rgba(0,0,0,0)" stroke-width="1" marker-end="url(#m_arrow_end_953a23)"/>
|
|
14
14
|
<path d="M353 185 C324.98526459978893 185, 296.97052919957787 185, 278 185" fill="none" stroke="#238495" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><polyline points="353,185 278,185" fill="none" stroke="rgba(0,0,0,0)" stroke-width="1" marker-end="url(#m_diamond_end_238495)"/>
|
|
15
15
|
<path d="M278 123 C302.600983960554 123, 327.201967921108 123, 353 123" fill="none" stroke="#953a23" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="8 4"/><polyline points="278,123 353,123" fill="none" stroke="rgba(0,0,0,0)" stroke-width="1" marker-end="url(#m_arrow_end_953a23)"/>
|
|
16
|
-
<path d="
|
|
17
|
-
<text x="
|
|
16
|
+
<path d="M315.5,123 h42.6 v16.5 h-42.6 z" fill="#953a23" stroke="none"/><path d="M315.5 123 C327.5295627511479 123, 339.5591255022958 123, 358.1 123 M358.1 123 C358.1 127.01484609092586, 358.1 131.02969218185171, 358.1 139.5 M358.1 139.5 C347.9660865621828 139.5, 337.8321731243655 139.5, 315.5 139.5 M315.5 139.5 C315.5 135.1198177606333, 315.5 130.73963552126662, 315.5 123" fill="none" stroke="#953a23" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/>
|
|
17
|
+
<text x="336.8" y="135" fill="#ffffff" font-size="10" text-anchor="middle"><tspan x="336.8" dy="0">styled</tspan></text>
|
|
18
18
|
</g></svg>
|
|
@@ -477,9 +477,9 @@
|
|
|
477
477
|
"link": null,
|
|
478
478
|
"locked": false,
|
|
479
479
|
"type": "text",
|
|
480
|
-
"x":
|
|
481
|
-
"y":
|
|
482
|
-
"width":
|
|
480
|
+
"x": 99,
|
|
481
|
+
"y": 1069.25,
|
|
482
|
+
"width": 138,
|
|
483
483
|
"height": 22.5,
|
|
484
484
|
"strokeColor": "#958923",
|
|
485
485
|
"backgroundColor": "transparent",
|
|
@@ -488,10 +488,14 @@
|
|
|
488
488
|
"fontSize": 18,
|
|
489
489
|
"fontFamily": 5,
|
|
490
490
|
"textAlign": "center",
|
|
491
|
-
"verticalAlign": "
|
|
491
|
+
"verticalAlign": "middle",
|
|
492
492
|
"baseline": 15,
|
|
493
493
|
"containerId": null,
|
|
494
|
-
"lineHeight": 1.25
|
|
494
|
+
"lineHeight": 1.25,
|
|
495
|
+
"customData": {
|
|
496
|
+
"role": "cloudTitleText",
|
|
497
|
+
"boxId": "cloud"
|
|
498
|
+
}
|
|
495
499
|
},
|
|
496
500
|
{
|
|
497
501
|
"id": "el_e_1yn51z",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<ellipse cx="168" cy="1084.1" rx="110" ry="34" fill="#ffffff" stroke="none"/><path d="M214.0912190207391 1051.8041427203884 C227.00482327571973 1053.241317414755, 238.95909830477393 1058.0160028674618, 248.01512314163594 1061.7524014350786 C257.07114797849795 1065.4888000026954, 264.20041023751276 1069.7941471378972, 268.42736804191105 1074.2225341260898 C272.65432584630935 1078.6509211142825, 275.0694678447452 1083.5378975840183, 273.37686996802574 1088.3227233642342 C271.6842720913063 1093.10754914445, 265.92750112335955 1098.791306887717, 258.2717807815944 1102.931488807385 C250.6160604398292 1107.071670727053, 239.46038978311975 1110.683657528554, 227.4425479174347 1113.1638148822433 C215.42470605174964 1115.6439722359326, 200.20204233905378 1117.0575088216253, 186.16472958748395 1117.8124329295204 C172.12741683591412 1118.5673570374154, 156.88892109009922 1118.8552070675262, 143.2186714080157 1117.693359529613 C129.54842172593217 1116.5315119916997, 115.44740291770927 1113.7024311070527, 104.14323149498287 1110.8413477020415 C92.83906007225647 1107.9802642970303, 82.14581852710033 1104.6509127233544, 75.3936428716573 1100.5268590995456 C68.64146721621428 1096.4028054757368, 64.80550804993773 1090.7392515853064, 63.63017756232472 1086.0970259591893 C62.4548470747117 1081.4548003330722, 63.621693128883756 1077.0621975322633, 68.34165994597922 1072.6735053428424 C73.06162676307468 1068.2848131534215, 82.09715915628055 1063.3994604342115, 91.9499784648975 1059.7648728226638 C101.80279777351444 1056.1302852111162, 114.18126574383737 1052.8069665168935, 127.45857579768092 1050.8659796735562 C140.73588585152447 1048.924992830219, 155.4198822455299 1047.5654409752221, 171.61383878795877 1048.1189517626403 C187.80779533038765 1048.6724625500585, 214.2910815808179 1052.7123322648226, 224.62231505225418 1054.187044398065 C234.95354852369047 1055.6617565313072, 234.44452201643557 1056.5239007791974, 233.60123961657644 1056.9672245620948 M124.07194742249024 1053.5763136322275 C136.00100231942972 1051.5064642255056, 154.11992156974196 1050.7344053475972, 168.69618524705 1050.391115790961 C183.27244892435806 1050.047826234325, 198.57738116184862 1049.6903584309175, 211.52952948633853 1051.51657629241 C224.48167781082844 1053.3427941539026, 237.01091478923797 1057.6215483815129, 246.4090751939894 1061.3484229599158 C255.80723559874082 1065.0752975383186, 263.3198175879843 1069.577822700317, 267.9184919148471 1073.8778237628271 C272.5171662417099 1078.1778248253372, 275.20916726466703 1082.572128843076, 274.0011211551664 1087.1484293349765 C272.7930750456658 1091.7247298268771, 268.05346611000823 1097.1298702322233, 260.67021525784315 1101.3356267142315 C253.28696440567805 1105.5413831962396, 241.26604151277297 1109.4187637894315, 229.70161604217577 1112.3829682270257 C218.13719057157857 1115.3471726646198, 205.11843738253 1117.885413057218, 191.2836624342599 1119.1208533397971 C177.4488874859898 1120.3562936223761, 161.049130458399 1120.8236497916307, 146.69296635255515 1119.7956099225005 C132.3368022467113 1118.7675700533703, 116.58920584746343 1115.8114947592464, 105.14667779919684 1112.9526141250158 C93.70414975093024 1110.093733490785, 85.09885736553551 1106.9763054048499, 78.03779806295555 1102.642326117117 C70.97673876037558 1098.308346829384, 64.54128836323403 1091.5773861070938, 62.78032198371706 1086.9487383986186 C61.019355604200086 1082.3200906901434, 63.014121836654375 1079.4268991162805, 67.47199978585371 1074.8704398662653 C71.92987773505305 1070.31398061625, 80.2139029272043 1063.197873549452, 89.52758967891309 1059.6099828985268 C98.84127643062187 1056.0220922476017, 117.4307155078225 1054.559953229019, 123.35412029610643 1053.343095960714 C129.27752508439036 1052.126238692409, 124.20651075514304 1051.8146031738709, 125.06801840861667 1052.3088392886975" fill="none" stroke="#958923" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
16
16
|
<ellipse cx="105" cy="1054.5" rx="14" ry="14" fill="#ffffff" stroke="none"/><path d="M100.50698086727601 1040.6254960708668 C102.96697477724591 1039.2538953530948, 106.7374843940378 1040.3752657586247, 109.33292772222879 1041.2017311702566 C111.92837105041977 1042.0281965818886, 114.47380961203135 1043.1188546045985, 116.07964083642194 1045.5842885406582 C117.68547206081254 1048.049722476718, 119.13410299239149 1052.617086249711, 118.96791506857238 1055.9943347866147 C118.80172714475327 1059.3715833235183, 117.22604340029318 1063.741454188733, 115.08251329350726 1065.8477797620792 C112.93898318672134 1067.9541053354253, 109.17438704988396 1068.5031228305302, 106.10673442785684 1068.6322882266913 C103.03908180582971 1068.7614536228525, 99.06541923356602 1068.3088721936745, 96.67659756134447 1066.6227721390467 C94.28777588912291 1064.936672084419, 92.54883590524429 1061.691422250271, 91.7738043945275 1058.5156878989244 C90.99877288381072 1055.3399535475778, 90.23210757873906 1050.722477893412, 92.02640849704372 1047.568366030967 C93.82070941534838 1044.414254168522, 100.36009840216846 1040.8653404549882, 102.53960990435542 1039.5910167242537 C104.71912140654237 1038.3166929935192, 105.0580698548728 1039.525850408602, 105.10347751016543 1039.9224236465602 M99.71530012863943 1041.7872749671417 C102.50826182346643 1040.6617521832547, 108.79270452049249 1038.4896154375167, 111.48517035784072 1039.5634550099455 C114.17763619518894 1040.6372945823744, 114.62497133593047 1045.293465671371, 115.87009515272878 1048.2303124017142 C117.11521896952709 1051.1671591320573, 119.50814504230817 1054.1887492105498, 118.95591325863056 1057.184535392004 C118.40368147495295 1060.180321573458, 114.78344777839476 1064.3189830026886, 112.55670445066308 1066.2050294904395 C110.3299611229314 1068.0910759781905, 108.16647910570828 1068.4636703893698, 105.59545329224042 1068.5008143185096 C103.02442747877257 1068.5379582476494, 99.63943752536807 1068.509151558599, 97.1305495698559 1066.4278930652783 C94.62166161434374 1064.3466345719578, 91.26632516057323 1059.4208471774407, 90.54212555916746 1056.0132633585863 C89.81792595776169 1052.605679539732, 91.27795894741007 1048.7034827145972, 92.78535196142124 1045.9823901521524 C94.29274497543241 1043.2612975897077, 98.41131573452905 1040.577218578923, 99.58648364323446 1039.6867079839187 C100.76165155193986 1038.7961973889144, 99.33974475017746 1040.220152010903, 99.8363594136537 1040.6393265821264" fill="none" stroke="#958923" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
17
17
|
<ellipse cx="193" cy="1058.5" rx="14" ry="14" fill="#ffffff" stroke="none"/><path d="M187.72256669416288 1044.547629900235 C190.5385934271789 1043.4792497856524, 195.40465338540585 1043.859784786196, 198.26314341244233 1045.1663522066972 C201.1216334394788 1046.4729196271983, 203.52265513614552 1049.6299925460996, 204.8735068563818 1052.387034423241 C206.22435857661807 1055.1440763003823, 206.8235710973136 1058.9297398015503, 206.36825373386 1061.7086034695446 C205.9129363704064 1064.487467137539, 204.41419804285198 1067.159837084745, 202.14160267566027 1069.0602164312065 C199.86900730846855 1070.960595777668, 195.75823609367336 1073.2419903505308, 192.73268153070973 1073.1108795483133 C189.7071269677461 1072.9797687460957, 186.21932317919422 1070.5306406907353, 183.98827529787852 1068.273551617901 C181.7572274165628 1066.0164625450666, 179.81520683334284 1062.4400571865697, 179.34639424281556 1059.5683451113066 C178.87758165228828 1056.6966330360435, 179.23850814430955 1053.717646197907, 181.1753997547149 1051.0432791663225 C183.11229136512026 1048.368912134738, 188.6886841871439 1044.6790504423925, 190.9677439052477 1043.5221429217986 C193.24680362335147 1042.3652354012047, 194.74412852004468 1043.6257512977538, 194.84975806333756 1044.1018340427584 M186.70756873092836 1045.662690634203 C189.17737817721664 1044.1996121404818, 192.8111715832104 1043.01236816906, 195.77862729450413 1043.9159277314184 C198.74608300579786 1044.8194872937768, 202.8235447472043 1048.6399122856726, 204.51230299869079 1051.0840480083534 C206.20106125017728 1053.5281837310342, 206.25446692712404 1055.5758782296198, 205.91117680342305 1058.5807420675033 C205.56788667972205 1061.5856059053867, 204.50853457415155 1066.8587349769248, 202.4525622564848 1069.113231035655 C200.39658993881807 1071.3677270943851, 196.6120376794167 1071.6945887717543, 193.57534289742256 1072.1077184198846 C190.53864811542843 1072.5208480680149, 186.68302638345935 1073.0069885935293, 184.2323935645201 1071.5920089244364 C181.78176074558084 1070.1770292553435, 179.62537740166312 1066.7573745536042, 178.87154598378706 1063.6178404053273 C178.117714565911 1060.4783062570505, 178.31145443323783 1055.8817611857955, 179.70940505726372 1052.754804034775 C181.10735568128962 1049.6278468837543, 186.31539362124914 1046.063480386511, 187.2592497279424 1044.8560974992038 C188.20310583463566 1043.6487146118966, 185.54293139472438 1044.9434597980455, 185.3725416974233 1045.510506710932" fill="none" stroke="#958923" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
18
|
-
<text x="168" y="
|
|
18
|
+
<text x="168" y="1087.25" fill="#958923" font-size="18" text-anchor="middle"><tspan x="168" dy="0">cloud</tspan></text>
|
|
19
19
|
<path d="M63.6,1156.5 h208.8 a5.6000000000000005,5.6000000000000005 0 0 1 5.6000000000000005,5.6000000000000005 v44.8 a5.6000000000000005,5.6000000000000005 0 0 1 -5.6000000000000005,5.6000000000000005 h-208.8 a5.6000000000000005,5.6000000000000005 0 0 1 -5.6000000000000005,-5.6000000000000005 v-44.8 a5.6000000000000005,5.6000000000000005 0 0 1 5.6000000000000005,-5.6000000000000005 z" fill="#ffffff" stroke="none"/><path d="M65.23186270165753 1157.1435795504326 C131.52499991739842 1155.2705765943815, 201.78032663536771 1155.2709423846472, 272.810689945845 1157.1388411628513 M64.15615822626212 1156.7897440585791 C132.51263089765393 1155.487906765362, 200.22023680711612 1156.1211181049518, 272.9671525138982 1156.3113065379453 M272.40000000000003 1156.5 C275.2501361851059 1155.1357003822923, 277.8931536301971 1157.4260886426605, 277.1136788949371 1162.4939375057816 M274.3129607304931 1157.027421630919 C276.903419572901 1154.9781126391142, 276.97520268447704 1159.4159877888449, 277.04497800357643 1163.4332106363026 M276.37256566435104 1160.2171838864683 C276.837854195416 1170.8115664801, 278.45532660561804 1182.0184597548841, 278.3214184418321 1206.0896056756376 M277.47041056677705 1162.2884688921272 C277.9754883258045 1178.30320650056, 278.79862048313026 1196.4160466785727, 278.7372923903168 1206.7409729786216 M278.00000000000006 1206.8999999999999 C279.7930457219482 1210.1028387580475, 275.4343934540115 1213.4183277264235, 271.61330209821466 1213.8055829182265 M278.5976822003723 1205.6174941673873 C280.00331131704155 1210.633379510086, 275.9670350976698 1210.3631087552753, 272.5850970555097 1214.1199665080753 M273.3809755447915 1211.9146365481931 C204.3667782411403 1213.1102867103255, 136.67527853885815 1213.3960372957597, 63.04269956632512 1213.7343561586172 M271.81753565833714 1211.916792871125 C222.76479264590384 1213.0602836100147, 172.2319115113456 1213.1273858607512, 63.063666074546184 1213.0184274576798 M63.60000000000002 1212.4999999999998 C60.21617376464988 1212.1118842735884, 59.26577039808037 1209.9956803355774, 56.14138599485161 1205.7433574810623 M62.89738780111077 1212.7065474167464 C60.256665280420435 1212.0778420340268, 58.01282451637091 1208.0450243384055, 55.98790684230628 1205.5511849652974 M58.05562821775677 1208.1296993359922 C56.549260062515756 1194.622961643636, 58.04798857623341 1185.0695549449324, 59.054499305784724 1163.8359895333647 M57.63090107962491 1206.126014573127 C58.640389972895406 1188.4457043309508, 57.07538431283834 1172.247774002105, 57.78024445101621 1162.2798950023948 M58.00000000000002 1162.1 C58.218000136315844 1158.0917855020202, 60.273264285508645 1155.928416647017, 63.02332120984795 1155.6381205692887 M59.099968157708666 1162.6629407539963 C56.63139487989249 1160.2694526902922, 58.84610935743536 1156.3328836213798, 65.57010658271614 1155.1148542892188 M63.60000000000002 1156.5 C63.600000000000016 1156.5, 63.60000000000001 1156.5, 63.6 1156.5 M63.60000000000002 1156.5 C63.600000000000016 1156.5, 63.600000000000016 1156.5, 63.6 1156.5" fill="none" stroke="#235095" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
20
20
|
<text x="168" y="1186.5" fill="#235095" font-size="18" text-anchor="middle"><tspan x="168" dy="0">component</tspan></text>
|
|
21
21
|
<path d="M65.38,370.6 h205.24 a7.38,7.38 0 0 1 7.38,7.38 v59.04 a7.38,7.38 0 0 1 -7.38,7.38 h-205.24 a7.38,7.38 0 0 1 -7.38,-7.38 v-59.04 a7.38,7.38 0 0 1 7.38,-7.38 z" fill="#ffffff" stroke="none"/><path d="M63.770992387047 371.97424640993796 C115.18698118835599 373.3045331743856, 164.99908720782068 372.56023084549366, 269.0233087855377 371.15081933115096 M65.9423761566581 369.89003276327935 C139.0848069826769 372.0759273141911, 214.7090256511437 371.46358382886956, 271.23334200124873 370.24000531594845 M270.62 370.6 C274.4942765353268 371.89440273158255, 276.1142562199384 375.16613119263, 278.2098249960691 378.4423852502555 M272.2670334697515 370.55261837355795 C274.16114269132 369.79061867902055, 276.1542550011538 375.3472992411795, 278.9677365167998 378.5894024420716 M279.64453370682895 377.2665623403341 C280.1446773875311 395.1448448238075, 279.61896591072826 417.2903563874811, 278.0142376553267 436.2858602762968 M277.8917482281104 378.5587191158161 C277.81696311691104 389.86365417832883, 278.6481300697595 403.9394394224212, 278.72188849095255 437.299346770607 M278 437.02000000000004 C278.3906009364873 439.7936666330343, 276.44967062454873 442.5224835645408, 271.3159279347211 445.5373369228095 M276.4041439462453 435.45242920748893 C278.72271632691843 440.935678134395, 275.0868528061567 444.14357196101923, 270.3788159008883 444.80235177883884 M272.02833476765613 445.907770361662 C203.39422300976182 445.9585308130454, 135.798833306781 444.8008183064311, 64.10569604470862 445.85636548995774 M270.26728981038207 444.9747856233058 C217.53969957477096 442.312539085172, 165.75500688041652 442.1255221139675, 66.22854419689291 444.8704788742012 M65.38 444.40000000000003 C62.56616880688614 443.8627112280578, 58.53368957526981 442.82534930315074, 57.795502858236425 437.73846993081276 M65.48797836072742 444.6234506737441 C59.13906253026596 446.01563249537725, 57.79618435343727 442.1107862244381, 55.91559314569458 436.4167358232476 M58.095869852229946 436.75363699205224 C56.60003913692086 415.3358224012256, 58.687967491661006 392.3334302499741, 59.423680795356624 376.4756726599485 M57.170602479018264 437.172264690958 C57.63286830396652 418.1308922128454, 58.02226661057472 397.24916386162494, 58.92934305313974 378.2985181086883 M57.99999999999999 377.98 C58.54502727277576 374.91562270540544, 62.65598519835419 369.5897437822074, 63.75524898536503 370.2437725555152 M59.92211093194782 376.1967960535735 C55.92595206042751 371.93604744290735, 63.37848915206066 368.778093147371, 64.18664735278114 372.0743660987355 M65.38 370.6 C65.38 370.6, 65.38 370.6, 65.38 370.6 M65.38 370.6 C65.38 370.6, 65.38 370.6, 65.38 370.6" fill="none" stroke="#952332" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
@@ -4,12 +4,14 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { BaseModuleLayout } from "../base/layout.mjs";
|
|
7
|
+
import { layoutGraphModel } from "../shared/graph_runtime.mjs";
|
|
7
8
|
|
|
8
9
|
/** @public */
|
|
9
10
|
export class UseCaseDiagramLayout extends BaseModuleLayout {
|
|
10
11
|
constructor() {
|
|
11
12
|
super({
|
|
12
|
-
layoutStrategy: "
|
|
13
|
+
layoutStrategy: "elkGraph",
|
|
14
|
+
layout: layoutGraphModel,
|
|
13
15
|
});
|
|
14
16
|
}
|
|
15
17
|
}
|
|
@@ -118,6 +118,8 @@ function sizeBox(box, width) {
|
|
|
118
118
|
box.width = width;
|
|
119
119
|
let innerWidth = Math.max(20, width - SIZING.boxPaddingX * 2);
|
|
120
120
|
if (box.shape === "diamond") innerWidth = diamondTextWidth(width);
|
|
121
|
+
else if (box.shape === "usecase") innerWidth = ellipseTextWidth(width, 0.72);
|
|
122
|
+
else if (box.shape === "cloud") innerWidth = ellipseTextWidth(width, 0.63);
|
|
121
123
|
// Auto-wrap the title so long labels stay inside the box. Manual
|
|
122
124
|
// line breaks ("\n") are preserved by wrapping each segment
|
|
123
125
|
// independently. `measureFitted` shrinks the font size when a
|
|
@@ -324,6 +326,17 @@ function diamondTextWidth(width) {
|
|
|
324
326
|
return Math.max(40, Math.floor(width * 0.46));
|
|
325
327
|
}
|
|
326
328
|
|
|
329
|
+
/**
|
|
330
|
+
* Approximate the widest stable text band inside a curved shape (ellipse-like).
|
|
331
|
+
* `ratio` controls how much of the outer width can safely hold wrapped text.
|
|
332
|
+
* @param {number} width Bounding-box width for the shape.
|
|
333
|
+
* @param {number} ratio Text-width ratio to the shape width.
|
|
334
|
+
* @returns {number} Inner text width.
|
|
335
|
+
*/
|
|
336
|
+
function ellipseTextWidth(width, ratio = 0.72) {
|
|
337
|
+
return Math.max(40, Math.floor(width * ratio));
|
|
338
|
+
}
|
|
339
|
+
|
|
327
340
|
/**
|
|
328
341
|
* Compute the inner content width of a plane based on its widest child.
|
|
329
342
|
* @param {import("../model/diagram.mjs").Plane} plane Plane to inspect.
|
|
@@ -34,6 +34,42 @@ import { exportSequenceDiagram } from "../../diagrams/sequence/render_excalidraw
|
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
* @typedef {{x:number,y:number}} Pt 2-D point in absolute pixels.
|
|
37
|
+
* @typedef {Object} LabelLayoutItem
|
|
38
|
+
* Internal placement model for both edge and endpoint labels.
|
|
39
|
+
* @property {string} id
|
|
40
|
+
* @property {'edge'|'endpoint'} kind
|
|
41
|
+
* @property {string} connectionId
|
|
42
|
+
* @property {'start'|'end'|null} [endpoint]
|
|
43
|
+
* @property {string} text
|
|
44
|
+
* @property {number} centerX
|
|
45
|
+
* @property {number} centerY
|
|
46
|
+
* @property {number} normalX
|
|
47
|
+
* @property {number} normalY
|
|
48
|
+
* @property {number} angle
|
|
49
|
+
* @property {number} padX
|
|
50
|
+
* @property {number} padY
|
|
51
|
+
* @property {string} strokeColor
|
|
52
|
+
* @property {string} backgroundColor
|
|
53
|
+
* @property {string} textColor
|
|
54
|
+
* @property {number} minGap
|
|
55
|
+
* @property {number} minFontSize
|
|
56
|
+
* @property {number} fontSize
|
|
57
|
+
* @property {number} maxTextWidth
|
|
58
|
+
* @property {number} x
|
|
59
|
+
* @property {number} y
|
|
60
|
+
* @property {number} width
|
|
61
|
+
* @property {number} height
|
|
62
|
+
* @property {number} measuredWidth
|
|
63
|
+
* @property {number} measuredHeight
|
|
64
|
+
* @property {number} minInnerTextWidth
|
|
65
|
+
* @property {number} fittedFontSize
|
|
66
|
+
* @property {string[]} lines
|
|
67
|
+
* @property {boolean} avoidedOverlap
|
|
68
|
+
* @property {string} roleChip
|
|
69
|
+
* @property {string} roleText
|
|
70
|
+
* @property {string} lineColor
|
|
71
|
+
* @property {string} link
|
|
72
|
+
* @property {string} tooltip
|
|
37
73
|
* @typedef {import("../style/colors.mjs").ColorTriple} ColorTriple
|
|
38
74
|
* @typedef {Record<string, unknown>} ExcalElement
|
|
39
75
|
* Excalidraw element. Excalidraw's JSON shape is loose and varies by
|
|
@@ -48,8 +84,10 @@ import { exportSequenceDiagram } from "../../diagrams/sequence/render_excalidraw
|
|
|
48
84
|
// identical output (= reviewable diffs in git, snapshot-friendly).
|
|
49
85
|
let _rng = Math.random;
|
|
50
86
|
let _idCounter = 0;
|
|
51
|
-
/** @type {
|
|
52
|
-
|
|
87
|
+
/** @type {number} */
|
|
88
|
+
const EDGE_LABEL_MAX_SHRINK_PASSES = 12;
|
|
89
|
+
/** @type {number} */
|
|
90
|
+
const EDGE_LABEL_MAX_SHIFT_PASSES = 24;
|
|
53
91
|
const RAND_RANGE = 2_000_000_000;
|
|
54
92
|
const newId = () => {
|
|
55
93
|
const r = Math.floor(_rng() * 0xffffffff).toString(36);
|
|
@@ -296,7 +334,6 @@ export function exportDiagram(diagram, opts = {}) {
|
|
|
296
334
|
// deterministic one from the source label so reruns produce identical
|
|
297
335
|
// documents.
|
|
298
336
|
_idCounter = 0;
|
|
299
|
-
_edgeLabelOccupied = [];
|
|
300
337
|
_rng =
|
|
301
338
|
typeof rng === "function"
|
|
302
339
|
? rng
|
|
@@ -310,6 +347,7 @@ export function exportDiagram(diagram, opts = {}) {
|
|
|
310
347
|
}
|
|
311
348
|
_activeGraphStyle = resolveGraphStyle(diagram.style);
|
|
312
349
|
const elements = /** @type {ExcalElement[]} */ ([]);
|
|
350
|
+
const labelLayouts = /** @type {LabelLayoutItem[]} */ ([]);
|
|
313
351
|
|
|
314
352
|
if (debugCorridors) renderDebugCorridors(diagram, elements);
|
|
315
353
|
|
|
@@ -340,10 +378,18 @@ export function exportDiagram(diagram, opts = {}) {
|
|
|
340
378
|
elements.push(a);
|
|
341
379
|
}
|
|
342
380
|
if (conn.label) {
|
|
343
|
-
const
|
|
344
|
-
|
|
381
|
+
const labelItem = collectEdgeLabelLayout(conn);
|
|
382
|
+
if (labelItem) labelLayouts.push(labelItem);
|
|
383
|
+
}
|
|
384
|
+
for (const endpointLabel of collectConnectionEndpointLabelLayouts(conn)) {
|
|
385
|
+
labelLayouts.push(endpointLabel);
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
if (labelLayouts.length) {
|
|
389
|
+
layoutGraphLabels(labelLayouts);
|
|
390
|
+
for (const label of labelLayouts) {
|
|
391
|
+
elements.push(...renderLabelLayoutElements(label));
|
|
345
392
|
}
|
|
346
|
-
for (const el of renderConnectionEndpointLabels(conn)) elements.push(el);
|
|
347
393
|
}
|
|
348
394
|
renderGraphPresentation(diagram, elements);
|
|
349
395
|
|
|
@@ -1246,6 +1292,41 @@ function renderDiamondText(box, color, elements) {
|
|
|
1246
1292
|
elements.push(title);
|
|
1247
1293
|
}
|
|
1248
1294
|
|
|
1295
|
+
/**
|
|
1296
|
+
* Render title text in a central band for ellipse-like shapes.
|
|
1297
|
+
* The text width is reduced from full box width to avoid visual overflow
|
|
1298
|
+
* into curved edges when wrapped labels are long.
|
|
1299
|
+
* @param {{box: Box, color: ColorTriple, elements: ExcalElement[], ratio: number, role: string}} opts
|
|
1300
|
+
*/
|
|
1301
|
+
function renderCurvedTextBoxTitle({ box, color, elements, ratio, role }) {
|
|
1302
|
+
const textWidth = Math.max(40, Math.floor(box.width * (ratio ?? 0.7)));
|
|
1303
|
+
const titleValue = box._wrappedTitle ?? String(box.title || "");
|
|
1304
|
+
const titleFontSize = box._wrappedTitleFontSize ?? FONT.sizeTitle;
|
|
1305
|
+
const titleHeight = titleValue.split("\n").length * titleFontSize * FONT.lineHeight;
|
|
1306
|
+
const title = applyLinkMetadata(
|
|
1307
|
+
text({
|
|
1308
|
+
x: box.x + (box.width - textWidth) / 2,
|
|
1309
|
+
y: box.y + (box.height - titleHeight) / 2,
|
|
1310
|
+
width: textWidth,
|
|
1311
|
+
height: titleHeight,
|
|
1312
|
+
value: titleValue,
|
|
1313
|
+
fontSize: titleFontSize,
|
|
1314
|
+
color: _activeGraphStyle.boxFontColor || color.stroke,
|
|
1315
|
+
align: "center",
|
|
1316
|
+
vAlign: "middle",
|
|
1317
|
+
}),
|
|
1318
|
+
box,
|
|
1319
|
+
);
|
|
1320
|
+
if (role) {
|
|
1321
|
+
title.customData = {
|
|
1322
|
+
...(title.customData || {}),
|
|
1323
|
+
role,
|
|
1324
|
+
boxId: box.id,
|
|
1325
|
+
};
|
|
1326
|
+
}
|
|
1327
|
+
elements.push(title);
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1249
1330
|
/**
|
|
1250
1331
|
* Render a UML state shape (rounded rectangle with optional compartments).
|
|
1251
1332
|
* @param {Box} box Box (shape == `state`).
|
|
@@ -1634,20 +1715,13 @@ function renderUsecase(box, color, elements) {
|
|
|
1634
1715
|
backgroundColor: color.fill,
|
|
1635
1716
|
}),
|
|
1636
1717
|
);
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
height: th,
|
|
1645
|
-
value: box.title,
|
|
1646
|
-
fontSize: FONT.sizeTitle,
|
|
1647
|
-
color: color.stroke,
|
|
1648
|
-
align: "center",
|
|
1649
|
-
}),
|
|
1650
|
-
);
|
|
1718
|
+
renderCurvedTextBoxTitle({
|
|
1719
|
+
box,
|
|
1720
|
+
color,
|
|
1721
|
+
elements,
|
|
1722
|
+
ratio: 0.72,
|
|
1723
|
+
role: "usecaseTitleText",
|
|
1724
|
+
});
|
|
1651
1725
|
}
|
|
1652
1726
|
|
|
1653
1727
|
// --- Database (cylinder approximation) ----------------------------------
|
|
@@ -1739,7 +1813,13 @@ function renderCloud(box, color, elements) {
|
|
|
1739
1813
|
backgroundColor: color.fill,
|
|
1740
1814
|
}),
|
|
1741
1815
|
);
|
|
1742
|
-
|
|
1816
|
+
renderCurvedTextBoxTitle({
|
|
1817
|
+
box,
|
|
1818
|
+
color,
|
|
1819
|
+
elements,
|
|
1820
|
+
ratio: 0.63,
|
|
1821
|
+
role: "cloudTitleText",
|
|
1822
|
+
});
|
|
1743
1823
|
}
|
|
1744
1824
|
|
|
1745
1825
|
// --- Interface (small filled circle, lollipop-style) --------------------
|
|
@@ -2060,21 +2140,17 @@ function renderNote(box, elements) {
|
|
|
2060
2140
|
}
|
|
2061
2141
|
|
|
2062
2142
|
/**
|
|
2063
|
-
*
|
|
2064
|
-
*
|
|
2065
|
-
*
|
|
2066
|
-
* measured with the same smart wrapping/shrink pass used for other
|
|
2067
|
-
* fitted text so whitespace, punctuation, explicit newlines, and long
|
|
2068
|
-
* single tokens stay inside the chip.
|
|
2143
|
+
* Collect a single edge-label layout item and keep all measurements in a
|
|
2144
|
+
* mutable structure so collisions can adjust the final position (and font
|
|
2145
|
+
* size, if needed) without re-parsing the diagram model.
|
|
2069
2146
|
*
|
|
2070
2147
|
* @param {import("../model/diagram.mjs").Connection} conn Connection whose label is rendered.
|
|
2071
|
-
* @returns {
|
|
2072
|
-
* (background rect + text), in z-order.
|
|
2148
|
+
* @returns {LabelLayoutItem|null}
|
|
2073
2149
|
* @internal
|
|
2074
2150
|
*/
|
|
2075
|
-
function
|
|
2151
|
+
function collectEdgeLabelLayout(conn) {
|
|
2076
2152
|
const path = conn.path;
|
|
2077
|
-
if (!path || path.length < 2) return
|
|
2153
|
+
if (!path || path.length < 2) return null;
|
|
2078
2154
|
// Place at the geometric midpoint of the longest segment so the
|
|
2079
2155
|
// chip sits on a long, straight stretch of the edge whenever
|
|
2080
2156
|
// possible (otherwise it would land on a short bend).
|
|
@@ -2111,106 +2187,438 @@ function renderEdgeLabel(conn) {
|
|
|
2111
2187
|
const padY = typeof style.paddingY === "number" ? style.paddingY : 2;
|
|
2112
2188
|
const segMargin = typeof style.segmentMargin === "number" ? style.segmentMargin : 24;
|
|
2113
2189
|
const maxWidthCap = typeof style.maxWidth === "number" ? style.maxWidth : 160;
|
|
2114
|
-
const minGap = typeof style.minGap === "number" ?
|
|
2190
|
+
const minGap = Math.max(2, typeof style.minGap === "number" ? style.minGap : 2);
|
|
2115
2191
|
|
|
2116
|
-
const fontSize = FONT.sizeEdgeLabel;
|
|
2117
2192
|
// Prefer a chip that fits the segment, but keep enough inner width
|
|
2118
2193
|
// for the smart wrapper's minimum four-character line budget. This
|
|
2119
2194
|
// makes containment win for very short routed segments instead of
|
|
2120
2195
|
// letting the text bleed out of the background.
|
|
2121
2196
|
const segCap = Math.max(40, bestLen - segMargin);
|
|
2122
|
-
const minInnerWidth = Math.ceil(fontSize * FONT.glyphRatio * 4);
|
|
2123
2197
|
const preferredChipWidth = Math.min(maxWidthCap, segCap);
|
|
2124
|
-
|
|
2125
|
-
const
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
height: h,
|
|
2198
|
+
/** @type {LabelLayoutItem} */
|
|
2199
|
+
const item = {
|
|
2200
|
+
id: `edge:${conn.id}`,
|
|
2201
|
+
kind: "edge",
|
|
2202
|
+
connectionId: conn.id,
|
|
2203
|
+
endpoint: null,
|
|
2204
|
+
text: String(conn.label),
|
|
2205
|
+
centerX: cx,
|
|
2206
|
+
centerY: cy,
|
|
2207
|
+
normalX: isVertical ? 1 : 0,
|
|
2208
|
+
normalY: isVertical ? 0 : 1,
|
|
2209
|
+
angle,
|
|
2210
|
+
padX,
|
|
2211
|
+
padY,
|
|
2139
2212
|
strokeColor,
|
|
2140
|
-
backgroundColor:
|
|
2213
|
+
backgroundColor: style.useLineColor === false ? style.backgroundColor || "#444" : lineColor,
|
|
2214
|
+
textColor: _activeGraphStyle.edgeFontColor || style.textColor || "#ffffff",
|
|
2215
|
+
minGap,
|
|
2216
|
+
minFontSize: Math.max(
|
|
2217
|
+
1,
|
|
2218
|
+
/** @type {any} */ (getStyle()).text?.minFontSize ??
|
|
2219
|
+
/** @type {any} */ (getStyle()).font?.minSize ??
|
|
2220
|
+
8,
|
|
2221
|
+
),
|
|
2222
|
+
fontSize: FONT.sizeEdgeLabel,
|
|
2223
|
+
maxTextWidth: preferredChipWidth,
|
|
2224
|
+
minInnerTextWidth: Math.max(40, Math.ceil(FONT.sizeEdgeLabel * FONT.glyphRatio * 4)),
|
|
2225
|
+
x: cx,
|
|
2226
|
+
y: cy,
|
|
2227
|
+
width: 20,
|
|
2228
|
+
height: FONT.sizeEdgeLabel * FONT.lineHeight,
|
|
2229
|
+
measuredWidth: 0,
|
|
2230
|
+
measuredHeight: 0,
|
|
2231
|
+
fittedFontSize: FONT.sizeEdgeLabel,
|
|
2232
|
+
lines: [],
|
|
2233
|
+
avoidedOverlap: false,
|
|
2234
|
+
roleChip: "edgeLabelChip",
|
|
2235
|
+
roleText: "edgeLabelText",
|
|
2236
|
+
lineColor,
|
|
2237
|
+
link: conn.link,
|
|
2238
|
+
tooltip: conn.tooltip,
|
|
2239
|
+
};
|
|
2240
|
+
applyLabelMeasurement(item);
|
|
2241
|
+
return item;
|
|
2242
|
+
}
|
|
2243
|
+
|
|
2244
|
+
/**
|
|
2245
|
+
* Collect optional endpoint label layouts for multiplicity labels.
|
|
2246
|
+
*
|
|
2247
|
+
* @param {import("../model/diagram.mjs").Connection} conn Routed connection.
|
|
2248
|
+
* @returns {LabelLayoutItem[]}
|
|
2249
|
+
*/
|
|
2250
|
+
function collectConnectionEndpointLabelLayouts(conn) {
|
|
2251
|
+
if (!conn.path || conn.path.length < 2) return [];
|
|
2252
|
+
/** @type {Array<{endpoint:"start"|"end",point:Pt,next:Pt,label:string|undefined}>} */
|
|
2253
|
+
const endpoints = [
|
|
2254
|
+
{
|
|
2255
|
+
endpoint: "start",
|
|
2256
|
+
point: conn.path[0],
|
|
2257
|
+
next: conn.path[1],
|
|
2258
|
+
label: conn.arrow.start.label,
|
|
2259
|
+
},
|
|
2260
|
+
{
|
|
2261
|
+
endpoint: "end",
|
|
2262
|
+
point: conn.path[conn.path.length - 1],
|
|
2263
|
+
next: conn.path[conn.path.length - 2],
|
|
2264
|
+
label: conn.arrow.end.label,
|
|
2265
|
+
},
|
|
2266
|
+
];
|
|
2267
|
+
const out = /** @type {LabelLayoutItem[]} */ ([]);
|
|
2268
|
+
const style = /** @type {any} */ (getStyle()).edgeLabel || {};
|
|
2269
|
+
const minGap = Math.max(2, typeof style.minGap === "number" ? style.minGap : 2);
|
|
2270
|
+
const lineColor = connectionStrokeColor(conn);
|
|
2271
|
+
for (const endpoint of endpoints) {
|
|
2272
|
+
if (!endpoint.label) continue;
|
|
2273
|
+
const fontSize = Math.max(FONT.sizeEdgeLabel + 2, FONT.sizeDescription);
|
|
2274
|
+
const text = String(endpoint.label);
|
|
2275
|
+
const minFontSize = Math.max(9, FONT.sizeEdgeLabel);
|
|
2276
|
+
const padX = 5;
|
|
2277
|
+
const padY = 2;
|
|
2278
|
+
const dx = endpoint.next.x - endpoint.point.x;
|
|
2279
|
+
const dy = endpoint.next.y - endpoint.point.y;
|
|
2280
|
+
const len = Math.max(1, Math.hypot(dx, dy));
|
|
2281
|
+
const ux = dx / len;
|
|
2282
|
+
const uy = dy / len;
|
|
2283
|
+
const nx = -uy;
|
|
2284
|
+
const ny = ux;
|
|
2285
|
+
/** @type {LabelLayoutItem} */
|
|
2286
|
+
const tempLabel = {
|
|
2287
|
+
id: `endpoint:${conn.id}:${endpoint.endpoint}`,
|
|
2288
|
+
kind: "endpoint",
|
|
2289
|
+
connectionId: conn.id,
|
|
2290
|
+
endpoint: endpoint.endpoint,
|
|
2291
|
+
text,
|
|
2292
|
+
centerX: 0,
|
|
2293
|
+
centerY: 0,
|
|
2294
|
+
normalX: nx,
|
|
2295
|
+
normalY: ny,
|
|
2296
|
+
angle: 0,
|
|
2297
|
+
padX,
|
|
2298
|
+
padY,
|
|
2299
|
+
strokeColor: lineColor,
|
|
2300
|
+
backgroundColor: "#ffffff",
|
|
2301
|
+
textColor: _activeGraphStyle.edgeFontColor || lineColor,
|
|
2302
|
+
minGap,
|
|
2303
|
+
minFontSize,
|
|
2304
|
+
fontSize,
|
|
2305
|
+
maxTextWidth: 96,
|
|
2306
|
+
minInnerTextWidth: 30,
|
|
2307
|
+
x: 0,
|
|
2308
|
+
y: 0,
|
|
2309
|
+
width: 30,
|
|
2310
|
+
height: Math.max(fontSize * FONT.lineHeight, 0),
|
|
2311
|
+
measuredWidth: 0,
|
|
2312
|
+
measuredHeight: 0,
|
|
2313
|
+
fittedFontSize: fontSize,
|
|
2314
|
+
lines: [],
|
|
2315
|
+
avoidedOverlap: false,
|
|
2316
|
+
roleChip: "arrowEndpointLabelChip",
|
|
2317
|
+
roleText: "arrowEndpointLabel",
|
|
2318
|
+
lineColor,
|
|
2319
|
+
link: "",
|
|
2320
|
+
tooltip: "",
|
|
2321
|
+
};
|
|
2322
|
+
applyLabelMeasurement(tempLabel);
|
|
2323
|
+
const center = endpointLabelCenter(
|
|
2324
|
+
endpoint.point,
|
|
2325
|
+
endpoint.next,
|
|
2326
|
+
tempLabel.width,
|
|
2327
|
+
tempLabel.height,
|
|
2328
|
+
);
|
|
2329
|
+
tempLabel.centerX = center.x;
|
|
2330
|
+
tempLabel.centerY = center.y;
|
|
2331
|
+
out.push(tempLabel);
|
|
2332
|
+
}
|
|
2333
|
+
return out;
|
|
2334
|
+
}
|
|
2335
|
+
|
|
2336
|
+
/**
|
|
2337
|
+
* Resolve all label layouts (edge labels and endpoint labels) so all chips keep
|
|
2338
|
+
* `minGap` px distance. Resolution is iterative:
|
|
2339
|
+
* 1) push colliding labels away from each other along their edge normals,
|
|
2340
|
+
* 2) retry until stable,
|
|
2341
|
+
* 3) shrink all currently-colliding labels and retry if needed.
|
|
2342
|
+
*
|
|
2343
|
+
* @param {LabelLayoutItem[]} labels horizontal list of labels to place.
|
|
2344
|
+
*/
|
|
2345
|
+
function layoutGraphLabels(labels) {
|
|
2346
|
+
if (labels.length < 2) return;
|
|
2347
|
+
|
|
2348
|
+
for (let shrinkPass = 0; shrinkPass <= EDGE_LABEL_MAX_SHRINK_PASSES; shrinkPass++) {
|
|
2349
|
+
for (let shiftPass = 0; shiftPass < EDGE_LABEL_MAX_SHIFT_PASSES; shiftPass++) {
|
|
2350
|
+
const pairs = collectOverlappingPairs(labels);
|
|
2351
|
+
if (!pairs.length) return;
|
|
2352
|
+
|
|
2353
|
+
let movedInIteration = false;
|
|
2354
|
+
for (const [leftIdx, rightIdx] of pairs) {
|
|
2355
|
+
if (resolveOverlappingPair(labels, leftIdx, rightIdx)) {
|
|
2356
|
+
movedInIteration = true;
|
|
2357
|
+
}
|
|
2358
|
+
}
|
|
2359
|
+
if (!movedInIteration) break;
|
|
2360
|
+
}
|
|
2361
|
+
|
|
2362
|
+
const remaining = collectOverlappingPairs(labels);
|
|
2363
|
+
if (!remaining.length) return;
|
|
2364
|
+
|
|
2365
|
+
const overlapIndices = /** @type {Set<number>} */ (new Set());
|
|
2366
|
+
for (const [leftIdx, rightIdx] of remaining) {
|
|
2367
|
+
overlapIndices.add(leftIdx);
|
|
2368
|
+
overlapIndices.add(rightIdx);
|
|
2369
|
+
}
|
|
2370
|
+
let didShrink = false;
|
|
2371
|
+
for (const idx of overlapIndices) {
|
|
2372
|
+
didShrink = shrinkLabelFont(labels[idx]) || didShrink;
|
|
2373
|
+
}
|
|
2374
|
+
if (!didShrink) return;
|
|
2375
|
+
}
|
|
2376
|
+
}
|
|
2377
|
+
|
|
2378
|
+
/**
|
|
2379
|
+
* Resolve one overlapping pair by moving the labels along their normals until
|
|
2380
|
+
* they no longer overlap.
|
|
2381
|
+
*
|
|
2382
|
+
* @param {LabelLayoutItem[]} labels All pending label items.
|
|
2383
|
+
* @param {number} leftIdx Index of first label.
|
|
2384
|
+
* @param {number} rightIdx Index of second label.
|
|
2385
|
+
* @returns {boolean}
|
|
2386
|
+
*/
|
|
2387
|
+
function resolveOverlappingPair(labels, leftIdx, rightIdx) {
|
|
2388
|
+
const left = labels[leftIdx];
|
|
2389
|
+
const right = labels[rightIdx];
|
|
2390
|
+
if (!pairOverlap(left, right)) return false;
|
|
2391
|
+
|
|
2392
|
+
const movedLeft = moveLabelAway(left, right);
|
|
2393
|
+
if (movedLeft) return true;
|
|
2394
|
+
|
|
2395
|
+
return moveLabelAway(right, left);
|
|
2396
|
+
}
|
|
2397
|
+
|
|
2398
|
+
/**
|
|
2399
|
+
* Move `item` away from `other` along the item normal. If both labels overlap,
|
|
2400
|
+
* we move by the minimum clearance distance and keep the gap at 0 for the
|
|
2401
|
+
* expanded bounds.
|
|
2402
|
+
*
|
|
2403
|
+
* @param {LabelLayoutItem} item Label to move.
|
|
2404
|
+
* @param {LabelLayoutItem} other Obstacle label.
|
|
2405
|
+
* @returns {boolean} true when moved.
|
|
2406
|
+
*/
|
|
2407
|
+
function moveLabelAway(item, other) {
|
|
2408
|
+
if (!pairOverlap(item, other)) return false;
|
|
2409
|
+
|
|
2410
|
+
const itemBounds = labelBoundsAtCandidate(item);
|
|
2411
|
+
const otherBounds = labelBoundsAtCandidate(other);
|
|
2412
|
+
const itemCenterX = item.x + item.width / 2;
|
|
2413
|
+
const itemCenterY = item.y + item.height / 2;
|
|
2414
|
+
const otherCenterX = other.x + other.width / 2;
|
|
2415
|
+
const otherCenterY = other.y + other.height / 2;
|
|
2416
|
+
const towardNormal =
|
|
2417
|
+
(itemCenterX - otherCenterX) * item.normalX + (itemCenterY - otherCenterY) * item.normalY;
|
|
2418
|
+
const sign = towardNormal >= 0 ? -1 : 1;
|
|
2419
|
+
|
|
2420
|
+
const vx = item.normalX * sign;
|
|
2421
|
+
const vy = item.normalY * sign;
|
|
2422
|
+
const distance = minimumClearanceDistance(itemBounds, otherBounds, vx, vy);
|
|
2423
|
+
if (!Number.isFinite(distance) || distance <= 0) return false;
|
|
2424
|
+
|
|
2425
|
+
item.x += vx * distance;
|
|
2426
|
+
item.y += vy * distance;
|
|
2427
|
+
item.avoidedOverlap = true;
|
|
2428
|
+
return true;
|
|
2429
|
+
}
|
|
2430
|
+
|
|
2431
|
+
/**
|
|
2432
|
+
* @param {LabelLayoutItem} item
|
|
2433
|
+
* @param {LabelLayoutItem} other
|
|
2434
|
+
* @returns {boolean}
|
|
2435
|
+
*/
|
|
2436
|
+
function pairOverlap(item, other) {
|
|
2437
|
+
return boundsOverlap(labelBoundsAtCandidate(item), labelBoundsAtCandidate(other));
|
|
2438
|
+
}
|
|
2439
|
+
|
|
2440
|
+
/**
|
|
2441
|
+
* @param {LabelLayoutItem[]} labels
|
|
2442
|
+
* @returns {Array<[number, number]>}
|
|
2443
|
+
*/
|
|
2444
|
+
function collectOverlappingPairs(labels) {
|
|
2445
|
+
const pairs = /** @type {Array<[number, number]>} */ ([]);
|
|
2446
|
+
for (let i = 0; i < labels.length; i++) {
|
|
2447
|
+
for (let j = i + 1; j < labels.length; j++) {
|
|
2448
|
+
if (pairOverlap(labels[i], labels[j])) pairs.push([i, j]);
|
|
2449
|
+
}
|
|
2450
|
+
}
|
|
2451
|
+
return pairs;
|
|
2452
|
+
}
|
|
2453
|
+
|
|
2454
|
+
/**
|
|
2455
|
+
* @param {{x:number,y:number,width:number,height:number}} mover
|
|
2456
|
+
* @param {{x:number,y:number,width:number,height:number}} obstacle
|
|
2457
|
+
* @param {number} vx
|
|
2458
|
+
* @param {number} vy
|
|
2459
|
+
* @returns {number}
|
|
2460
|
+
*/
|
|
2461
|
+
function minimumClearanceDistance(mover, obstacle, vx, vy) {
|
|
2462
|
+
const eps = 1e-9;
|
|
2463
|
+
const dists = /** @type {number[]} */ ([]);
|
|
2464
|
+
if (vx > eps) dists.push((obstacle.x + obstacle.width - mover.x) / vx);
|
|
2465
|
+
else if (vx < -eps) dists.push((mover.x + mover.width - obstacle.x) / -vx);
|
|
2466
|
+
|
|
2467
|
+
if (vy > eps) dists.push((obstacle.y + obstacle.height - mover.y) / vy);
|
|
2468
|
+
else if (vy < -eps) dists.push((mover.y + mover.height - obstacle.y) / -vy);
|
|
2469
|
+
|
|
2470
|
+
if (!dists.length) return Infinity;
|
|
2471
|
+
const distance = Math.min(...dists);
|
|
2472
|
+
return distance <= 0 ? 0 : distance;
|
|
2473
|
+
}
|
|
2474
|
+
|
|
2475
|
+
/**
|
|
2476
|
+
* @param {LabelLayoutItem} item
|
|
2477
|
+
* @param {boolean} [forceShrink]
|
|
2478
|
+
*/
|
|
2479
|
+
function applyLabelMeasurement(item, forceShrink = false) {
|
|
2480
|
+
const autoShrink = forceShrink || /** @type {any} */ (getStyle()).text?.autoShrink !== false;
|
|
2481
|
+
const minFontSize = item.minFontSize;
|
|
2482
|
+
let fontSize = item.fontSize;
|
|
2483
|
+
/** @type {{width:number, height:number, lines:string[], fontSize?:number}} */
|
|
2484
|
+
let wrapped = /** @type {{ width: number, height: number, lines: string[] }} */ ({
|
|
2485
|
+
width: 0,
|
|
2486
|
+
height: 0,
|
|
2487
|
+
lines: [],
|
|
2488
|
+
});
|
|
2489
|
+
|
|
2490
|
+
const maxWidth = Math.max(4, item.maxTextWidth - item.padX * 2);
|
|
2491
|
+
if (item.kind === "edge") {
|
|
2492
|
+
const minInnerWidth = Math.max(
|
|
2493
|
+
item.minInnerTextWidth,
|
|
2494
|
+
Math.ceil(fontSize * FONT.glyphRatio * 4),
|
|
2495
|
+
);
|
|
2496
|
+
const innerWidth = Math.max(minInnerWidth, maxWidth);
|
|
2497
|
+
wrapped =
|
|
2498
|
+
autoShrink || forceShrink
|
|
2499
|
+
? measureSmartFitted(item.text, fontSize, innerWidth, { minFontSize })
|
|
2500
|
+
: measureSmartWrapped(item.text, fontSize, innerWidth);
|
|
2501
|
+
while (forceShrink && fontSize > minFontSize) {
|
|
2502
|
+
const rawW = Math.max(
|
|
2503
|
+
0,
|
|
2504
|
+
...wrapped.lines.map((line) => measureSmartWrapped(line, fontSize, innerWidth).width),
|
|
2505
|
+
);
|
|
2506
|
+
if (rawW <= innerWidth + 0.5) break;
|
|
2507
|
+
fontSize -= 1;
|
|
2508
|
+
wrapped = measureSmartWrapped(item.text, fontSize, innerWidth);
|
|
2509
|
+
}
|
|
2510
|
+
} else {
|
|
2511
|
+
wrapped =
|
|
2512
|
+
autoShrink || forceShrink
|
|
2513
|
+
? measureSmartFitted(item.text, fontSize, item.maxTextWidth, { minFontSize })
|
|
2514
|
+
: measureSmartWrapped(item.text, fontSize, item.maxTextWidth);
|
|
2515
|
+
while (forceShrink && fontSize > minFontSize) {
|
|
2516
|
+
const rawW = Math.max(
|
|
2517
|
+
0,
|
|
2518
|
+
...wrapped.lines.map((line) => line.length * fontSize * FONT.glyphRatio),
|
|
2519
|
+
);
|
|
2520
|
+
if (rawW <= item.maxTextWidth + 0.5) break;
|
|
2521
|
+
fontSize -= 1;
|
|
2522
|
+
wrapped = measureSmartWrapped(item.text, fontSize, item.maxTextWidth);
|
|
2523
|
+
}
|
|
2524
|
+
}
|
|
2525
|
+
item.fittedFontSize = wrapped.fontSize || fontSize;
|
|
2526
|
+
item.lines = wrapped.lines;
|
|
2527
|
+
item.measuredWidth = wrapped.width;
|
|
2528
|
+
item.measuredHeight = wrapped.height;
|
|
2529
|
+
item.width = Math.max(item.kind === "endpoint" ? 30 : 20, wrapped.width + item.padX * 2);
|
|
2530
|
+
item.height = Math.max(fontSize * FONT.lineHeight, wrapped.height) + item.padY * 2;
|
|
2531
|
+
item.fontSize = fontSize;
|
|
2532
|
+
}
|
|
2533
|
+
|
|
2534
|
+
/**
|
|
2535
|
+
* @param {LabelLayoutItem} item
|
|
2536
|
+
* @returns {boolean}
|
|
2537
|
+
*/
|
|
2538
|
+
function shrinkLabelFont(item) {
|
|
2539
|
+
if (item.fontSize <= item.minFontSize) return false;
|
|
2540
|
+
const before = { fontSize: item.fontSize, width: item.width, height: item.height };
|
|
2541
|
+
item.fontSize -= 1;
|
|
2542
|
+
applyLabelMeasurement(item, true);
|
|
2543
|
+
if (item.width >= before.width && item.height >= before.height) {
|
|
2544
|
+
item.fontSize = before.fontSize;
|
|
2545
|
+
item.width = before.width;
|
|
2546
|
+
item.height = before.height;
|
|
2547
|
+
return false;
|
|
2548
|
+
}
|
|
2549
|
+
return true;
|
|
2550
|
+
}
|
|
2551
|
+
|
|
2552
|
+
/**
|
|
2553
|
+
* @param {LabelLayoutItem} item
|
|
2554
|
+
* @returns {{x:number,y:number,width:number,height:number}}
|
|
2555
|
+
*/
|
|
2556
|
+
function labelBoundsAtCandidate(item) {
|
|
2557
|
+
return expandedRotatedBounds(item.x, item.y, item.width, item.height, item.angle, item.minGap);
|
|
2558
|
+
}
|
|
2559
|
+
|
|
2560
|
+
/**
|
|
2561
|
+
* Build final Excalidraw elements for one resolved label layout item.
|
|
2562
|
+
*
|
|
2563
|
+
* @param {LabelLayoutItem} item
|
|
2564
|
+
* @returns {ExcalElement[]}
|
|
2565
|
+
*/
|
|
2566
|
+
function renderLabelLayoutElements(item) {
|
|
2567
|
+
const out = /** @type {ExcalElement[]} */ ([]);
|
|
2568
|
+
const chip = rect({
|
|
2569
|
+
x: item.x,
|
|
2570
|
+
y: item.y,
|
|
2571
|
+
width: item.width,
|
|
2572
|
+
height: item.height,
|
|
2573
|
+
strokeColor: item.strokeColor,
|
|
2574
|
+
backgroundColor: item.backgroundColor,
|
|
2141
2575
|
});
|
|
2142
|
-
chip.angle = angle;
|
|
2576
|
+
chip.angle = item.angle;
|
|
2143
2577
|
chip.roughness = 0;
|
|
2144
2578
|
chip.roundness = null;
|
|
2145
2579
|
chip.strokeWidth = 1;
|
|
2146
2580
|
chip.customData = {
|
|
2147
|
-
role:
|
|
2148
|
-
connectionId:
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2581
|
+
role: item.roleChip,
|
|
2582
|
+
connectionId: item.connectionId,
|
|
2583
|
+
endpoint: item.endpoint,
|
|
2584
|
+
lineColor: item.lineColor,
|
|
2585
|
+
fittedFontSize: item.fittedFontSize,
|
|
2586
|
+
avoidedOverlap: item.avoidedOverlap,
|
|
2152
2587
|
};
|
|
2588
|
+
out.push(chip);
|
|
2153
2589
|
|
|
2590
|
+
const textValue = item.lines.join("\n");
|
|
2154
2591
|
const label = text({
|
|
2155
|
-
x: x + padX,
|
|
2156
|
-
y: y + padY,
|
|
2157
|
-
width:
|
|
2158
|
-
height:
|
|
2159
|
-
value,
|
|
2160
|
-
fontSize:
|
|
2161
|
-
color: textColor,
|
|
2592
|
+
x: item.x + item.padX,
|
|
2593
|
+
y: item.y + item.padY,
|
|
2594
|
+
width: item.width - item.padX * 2,
|
|
2595
|
+
height: item.height - item.padY * 2,
|
|
2596
|
+
value: textValue,
|
|
2597
|
+
fontSize: item.fittedFontSize,
|
|
2598
|
+
color: item.textColor,
|
|
2162
2599
|
align: "center",
|
|
2163
2600
|
vAlign: "middle",
|
|
2164
2601
|
});
|
|
2165
|
-
label.angle = angle;
|
|
2602
|
+
label.angle = item.angle;
|
|
2166
2603
|
label.customData = {
|
|
2167
|
-
role:
|
|
2168
|
-
connectionId:
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2604
|
+
role: item.roleText,
|
|
2605
|
+
connectionId: item.connectionId,
|
|
2606
|
+
endpoint: item.endpoint,
|
|
2607
|
+
lineColor: item.lineColor,
|
|
2608
|
+
fittedFontSize: item.fittedFontSize,
|
|
2609
|
+
measuredWidth: item.measuredWidth,
|
|
2610
|
+
measuredHeight: item.measuredHeight,
|
|
2611
|
+
avoidedOverlap: item.avoidedOverlap,
|
|
2174
2612
|
};
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
* edge-label chips. Labels first try the actual edge midpoint, then
|
|
2182
|
-
* move perpendicular to the edge in alternating directions.
|
|
2183
|
-
*
|
|
2184
|
-
* @param {number} cx Base chip centre x.
|
|
2185
|
-
* @param {number} cy Base chip centre y.
|
|
2186
|
-
* @param {number} width Chip width.
|
|
2187
|
-
* @param {number} height Chip height.
|
|
2188
|
-
* @param {number} angle Chip rotation angle.
|
|
2189
|
-
* @param {boolean} isVertical Whether the owning segment is vertical.
|
|
2190
|
-
* @param {number} minGap Minimum gap around chip bounds.
|
|
2191
|
-
* @returns {{x:number,y:number,offset:number}}
|
|
2192
|
-
*/
|
|
2193
|
-
function placeEdgeLabelChip(cx, cy, width, height, angle, isVertical, minGap) {
|
|
2194
|
-
const step = (isVertical ? width : height) + minGap;
|
|
2195
|
-
const offsets = [0];
|
|
2196
|
-
for (let i = 1; i <= 12; i++) offsets.push(i * step, -i * step);
|
|
2197
|
-
|
|
2198
|
-
let fallback = { x: cx - width / 2, y: cy - height / 2, offset: 0 };
|
|
2199
|
-
for (const offset of offsets) {
|
|
2200
|
-
const x = cx - width / 2 + (isVertical ? offset : 0);
|
|
2201
|
-
const y = cy - height / 2 + (isVertical ? 0 : offset);
|
|
2202
|
-
const bounds = expandedRotatedBounds(x, y, width, height, angle, minGap);
|
|
2203
|
-
if (!_edgeLabelOccupied.some((occupied) => boundsOverlap(bounds, occupied))) {
|
|
2204
|
-
_edgeLabelOccupied.push(bounds);
|
|
2205
|
-
return { x, y, offset };
|
|
2206
|
-
}
|
|
2207
|
-
fallback = { x, y, offset };
|
|
2613
|
+
if (item.kind === "edge") {
|
|
2614
|
+
const placeholder = {
|
|
2615
|
+
link: item.link || "",
|
|
2616
|
+
tooltip: item.tooltip || "",
|
|
2617
|
+
};
|
|
2618
|
+
applyLinkMetadata(label, /** @type {any} */ (placeholder));
|
|
2208
2619
|
}
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
expandedRotatedBounds(fallback.x, fallback.y, width, height, angle, minGap),
|
|
2212
|
-
);
|
|
2213
|
-
return fallback;
|
|
2620
|
+
out.push(label);
|
|
2621
|
+
return out;
|
|
2214
2622
|
}
|
|
2215
2623
|
|
|
2216
2624
|
/**
|
|
@@ -2269,87 +2677,6 @@ function boundsOverlap(a, b) {
|
|
|
2269
2677
|
return a.x < b.x + b.width && a.x + a.width > b.x && a.y < b.y + b.height && a.y + a.height > b.y;
|
|
2270
2678
|
}
|
|
2271
2679
|
|
|
2272
|
-
/**
|
|
2273
|
-
* Render optional endpoint labels (multiplicities or future arrow-tip text)
|
|
2274
|
-
* near the first and last routed path points.
|
|
2275
|
-
* @param {import("../model/diagram.mjs").Connection} conn Routed connection.
|
|
2276
|
-
* @returns {ExcalElement[]} Text elements.
|
|
2277
|
-
*/
|
|
2278
|
-
function renderConnectionEndpointLabels(conn) {
|
|
2279
|
-
if (!conn.path || conn.path.length < 2) return [];
|
|
2280
|
-
const endpoints = [
|
|
2281
|
-
{
|
|
2282
|
-
name: "start",
|
|
2283
|
-
point: conn.path[0],
|
|
2284
|
-
next: conn.path[1],
|
|
2285
|
-
label: conn.arrow.start.label,
|
|
2286
|
-
},
|
|
2287
|
-
{
|
|
2288
|
-
name: "end",
|
|
2289
|
-
point: conn.path[conn.path.length - 1],
|
|
2290
|
-
next: conn.path[conn.path.length - 2],
|
|
2291
|
-
label: conn.arrow.end.label,
|
|
2292
|
-
},
|
|
2293
|
-
];
|
|
2294
|
-
const out = [];
|
|
2295
|
-
const lineColor = connectionStrokeColor(conn);
|
|
2296
|
-
for (const endpoint of endpoints) {
|
|
2297
|
-
if (!endpoint.label) continue;
|
|
2298
|
-
const fontSize = Math.max(FONT.sizeEdgeLabel + 2, FONT.sizeDescription);
|
|
2299
|
-
const wrapped = measureSmartFitted(endpoint.label, fontSize, 96, {
|
|
2300
|
-
minFontSize: Math.max(9, FONT.sizeEdgeLabel),
|
|
2301
|
-
});
|
|
2302
|
-
const padX = 5;
|
|
2303
|
-
const padY = 2;
|
|
2304
|
-
const width = Math.max(30, wrapped.width + padX * 2);
|
|
2305
|
-
const height = Math.max(fontSize * FONT.lineHeight, wrapped.height) + padY * 2;
|
|
2306
|
-
const labelCenter = endpointLabelCenter(endpoint.point, endpoint.next, width, height);
|
|
2307
|
-
const chip = rect({
|
|
2308
|
-
x: labelCenter.x - width / 2,
|
|
2309
|
-
y: labelCenter.y - height / 2,
|
|
2310
|
-
width,
|
|
2311
|
-
height,
|
|
2312
|
-
strokeColor: lineColor,
|
|
2313
|
-
backgroundColor: "#ffffff",
|
|
2314
|
-
});
|
|
2315
|
-
chip.roughness = 0;
|
|
2316
|
-
chip.roundness = null;
|
|
2317
|
-
chip.strokeWidth = 1;
|
|
2318
|
-
chip.customData = {
|
|
2319
|
-
role: "arrowEndpointLabelChip",
|
|
2320
|
-
connectionId: conn.id,
|
|
2321
|
-
endpoint: endpoint.name,
|
|
2322
|
-
lineColor,
|
|
2323
|
-
};
|
|
2324
|
-
out.push(chip);
|
|
2325
|
-
|
|
2326
|
-
const chipX = Number(chip.x);
|
|
2327
|
-
const chipY = Number(chip.y);
|
|
2328
|
-
const label = text({
|
|
2329
|
-
x: chipX + padX,
|
|
2330
|
-
y: chipY + padY,
|
|
2331
|
-
width: width - padX * 2,
|
|
2332
|
-
height: height - padY * 2,
|
|
2333
|
-
value: wrapped.lines.join("\n"),
|
|
2334
|
-
fontSize: wrapped.fontSize,
|
|
2335
|
-
color: _activeGraphStyle.edgeFontColor || lineColor,
|
|
2336
|
-
align: "center",
|
|
2337
|
-
vAlign: "middle",
|
|
2338
|
-
});
|
|
2339
|
-
label.customData = {
|
|
2340
|
-
role: "arrowEndpointLabel",
|
|
2341
|
-
connectionId: conn.id,
|
|
2342
|
-
endpoint: endpoint.name,
|
|
2343
|
-
lineColor,
|
|
2344
|
-
measuredWidth: wrapped.width,
|
|
2345
|
-
measuredHeight: wrapped.height,
|
|
2346
|
-
fittedFontSize: wrapped.fontSize,
|
|
2347
|
-
};
|
|
2348
|
-
out.push(label);
|
|
2349
|
-
}
|
|
2350
|
-
return out;
|
|
2351
|
-
}
|
|
2352
|
-
|
|
2353
2680
|
/**
|
|
2354
2681
|
* Place an endpoint label just inside the routed edge rather than on the
|
|
2355
2682
|
* element border. The perpendicular offset keeps the label from sitting
|
|
@@ -84,7 +84,7 @@ export const DEFAULT_STYLE = deepFreeze({
|
|
|
84
84
|
/** Hard cap on chip width in px. */
|
|
85
85
|
maxWidth: 160,
|
|
86
86
|
/** Minimum spacing in px between independent edge-label chips. */
|
|
87
|
-
minGap:
|
|
87
|
+
minGap: 2,
|
|
88
88
|
/** Minimum gap to leave around arrowheads at the segment ends. */
|
|
89
89
|
segmentMargin: 24,
|
|
90
90
|
},
|