free-layout-specs.ts 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. import { WorkflowJSON } from "@flowgram.ai/free-layout-core";
  2. export const freeLayout1: WorkflowJSON = {
  3. "nodes": [
  4. {
  5. "id": "start_0",
  6. "type": "start",
  7. "meta": {
  8. "position": {
  9. "x": -264,
  10. "y": -79
  11. }
  12. },
  13. "data": {}
  14. },
  15. {
  16. "id": "end_0",
  17. "type": "end",
  18. "meta": {
  19. "position": {
  20. "x": 1515,
  21. "y": -191
  22. }
  23. },
  24. "data": {}
  25. },
  26. {
  27. "id": "base_1",
  28. "type": "base",
  29. "meta": {
  30. "position": {
  31. "x": 103.5,
  32. "y": -122.5
  33. }
  34. }
  35. },
  36. {
  37. "id": "base_2",
  38. "type": "base",
  39. "meta": {
  40. "position": {
  41. "x": 525.5,
  42. "y": -250.5
  43. }
  44. }
  45. },
  46. {
  47. "id": "loop_1",
  48. "type": "loop",
  49. "meta": {
  50. "position": {
  51. "x": 541.5,
  52. "y": 42.5
  53. },
  54. "canvasPosition": {
  55. "x": 1154.5,
  56. "y": 206.5
  57. }
  58. },
  59. "data": {
  60. "target": {
  61. "meta": {
  62. "name": "循环输出_"
  63. },
  64. "type": "Boolean"
  65. }
  66. },
  67. "blocks": [
  68. {
  69. "id": "base_in_loop_1",
  70. "type": "base",
  71. "meta": {
  72. "position": {
  73. "x": 40,
  74. "y": 100
  75. }
  76. }
  77. },
  78. {
  79. "id": "base_in_loop_2",
  80. "type": "base",
  81. "meta": {
  82. "position": {
  83. "x": 62,
  84. "y": 299
  85. }
  86. }
  87. },
  88. {
  89. "id": "base_in_loop_3",
  90. "type": "base",
  91. "meta": {
  92. "position": {
  93. "x": 457,
  94. "y": 188
  95. }
  96. }
  97. }
  98. ],
  99. "edges": [
  100. {
  101. "sourceNodeID": "base_in_loop_1",
  102. "targetNodeID": "base_in_loop_3"
  103. },
  104. {
  105. "sourceNodeID": "base_in_loop_2",
  106. "targetNodeID": "base_in_loop_3"
  107. }
  108. ]
  109. },
  110. {
  111. "id": "base_3",
  112. "type": "base",
  113. "meta": {
  114. "position": {
  115. "x": 1063.5,
  116. "y": -52.987060546875
  117. }
  118. }
  119. }
  120. ],
  121. "edges": [
  122. {
  123. "sourceNodeID": "base_2",
  124. "targetNodeID": "end_0"
  125. },
  126. {
  127. "sourceNodeID": "base_3",
  128. "targetNodeID": "end_0"
  129. },
  130. {
  131. "sourceNodeID": "start_0",
  132. "targetNodeID": "base_1"
  133. },
  134. {
  135. "sourceNodeID": "base_1",
  136. "targetNodeID": "base_2"
  137. },
  138. {
  139. "sourceNodeID": "base_1",
  140. "targetNodeID": "loop_1"
  141. },
  142. {
  143. "sourceNodeID": "loop_1",
  144. "targetNodeID": "base_3",
  145. "sourcePortID": "loop-output"
  146. }
  147. ]
  148. }