cpee 2.1.128 → 2.1.130

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.
Files changed (120) hide show
  1. checksums.yaml +4 -4
  2. data/cockpit/compliance.html +11 -9
  3. data/cockpit/css/llm.css +19 -23
  4. data/cockpit/css/ui.css +1 -3
  5. data/cockpit/edit.html +6 -7
  6. data/cockpit/index.html +6 -7
  7. data/cockpit/js/details.js +1 -1
  8. data/cockpit/js/instance.js +11 -8
  9. data/cockpit/js/wfadaptor.js +75 -67
  10. data/cockpit/llm.html +17 -6
  11. data/cockpit/llmmodel.html +18 -11
  12. data/cockpit/model.html +7 -7
  13. data/cockpit/only_llm.html +1 -4
  14. data/cockpit/themes/base.js +21 -5
  15. data/cockpit/themes/control/symbols/alternative.svg +2 -2
  16. data/cockpit/themes/control/symbols/closed_loop.svg +1 -1
  17. data/cockpit/themes/control/symbols/closed_loop_cancel.svg +1 -1
  18. data/cockpit/themes/control/symbols/closed_loop_control.svg +1 -1
  19. data/cockpit/themes/control/symbols/closed_loop_measuring.svg +1 -1
  20. data/cockpit/themes/control/symbols/critical.svg +13 -3
  21. data/cockpit/themes/control/symbols/parallel_branch.svg +1 -1
  22. data/cockpit/themes/control/symbols/parallel_branch_normal.svg +1 -1
  23. data/cockpit/themes/control/symbols/terminate.svg +1 -1
  24. data/cockpit/themes/dataflow/symbols/alternative.svg +2 -2
  25. data/cockpit/themes/dataflow/symbols/closed_loop.svg +1 -1
  26. data/cockpit/themes/dataflow/symbols/closed_loop_cancel.svg +1 -1
  27. data/cockpit/themes/dataflow/symbols/closed_loop_control.svg +1 -1
  28. data/cockpit/themes/dataflow/symbols/closed_loop_measuring.svg +1 -1
  29. data/cockpit/themes/dataflow/symbols/critical.svg +13 -3
  30. data/cockpit/themes/dataflow/symbols/parallel_branch.svg +1 -1
  31. data/cockpit/themes/dataflow/symbols/parallel_branch_normal.svg +1 -1
  32. data/cockpit/themes/dataflow/symbols/terminate.svg +1 -1
  33. data/cockpit/themes/default/symbols/alternative.svg +2 -2
  34. data/cockpit/themes/default/symbols/closed_loop.svg +1 -1
  35. data/cockpit/themes/default/symbols/closed_loop_cancel.svg +1 -1
  36. data/cockpit/themes/default/symbols/closed_loop_control.svg +1 -1
  37. data/cockpit/themes/default/symbols/closed_loop_measuring.svg +1 -1
  38. data/cockpit/themes/default/symbols/critical.svg +13 -3
  39. data/cockpit/themes/default/symbols/parallel_branch.svg +1 -1
  40. data/cockpit/themes/default/symbols/parallel_branch_normal.svg +1 -1
  41. data/cockpit/themes/default/symbols/terminate.svg +1 -1
  42. data/cockpit/themes/extended/symbols/alternative.svg +2 -2
  43. data/cockpit/themes/extended/symbols/closed_loop.svg +1 -1
  44. data/cockpit/themes/extended/symbols/closed_loop_cancel.svg +1 -1
  45. data/cockpit/themes/extended/symbols/closed_loop_control.svg +1 -1
  46. data/cockpit/themes/extended/symbols/closed_loop_measuring.svg +1 -1
  47. data/cockpit/themes/extended/symbols/critical.svg +13 -3
  48. data/cockpit/themes/extended/symbols/parallel_branch.svg +1 -1
  49. data/cockpit/themes/extended/symbols/parallel_branch_normal.svg +1 -1
  50. data/cockpit/themes/extended/symbols/terminate.svg +1 -1
  51. data/cockpit/themes/felix/symbols/alternative.svg +2 -2
  52. data/cockpit/themes/felix/symbols/closed_loop.svg +1 -1
  53. data/cockpit/themes/felix/symbols/closed_loop_cancel.svg +1 -1
  54. data/cockpit/themes/felix/symbols/closed_loop_control.svg +1 -1
  55. data/cockpit/themes/felix/symbols/closed_loop_measuring.svg +1 -1
  56. data/cockpit/themes/felix/symbols/critical.svg +13 -3
  57. data/cockpit/themes/felix/symbols/parallel_branch.svg +1 -1
  58. data/cockpit/themes/felix/symbols/parallel_branch_normal.svg +1 -1
  59. data/cockpit/themes/felix/symbols/terminate.svg +1 -1
  60. data/cockpit/themes/model/symbols/alternative.svg +2 -2
  61. data/cockpit/themes/model/symbols/closed_loop.svg +1 -1
  62. data/cockpit/themes/model/symbols/closed_loop_cancel.svg +1 -1
  63. data/cockpit/themes/model/symbols/closed_loop_control.svg +1 -1
  64. data/cockpit/themes/model/symbols/closed_loop_measuring.svg +1 -1
  65. data/cockpit/themes/model/symbols/critical.svg +13 -3
  66. data/cockpit/themes/model/symbols/parallel_branch.svg +1 -1
  67. data/cockpit/themes/model/symbols/parallel_branch_normal.svg +1 -1
  68. data/cockpit/themes/model/symbols/terminate.svg +1 -1
  69. data/cockpit/themes/packed/symbols/alternative.svg +2 -2
  70. data/cockpit/themes/packed/symbols/closed_loop.svg +1 -1
  71. data/cockpit/themes/packed/symbols/closed_loop_cancel.svg +1 -1
  72. data/cockpit/themes/packed/symbols/closed_loop_control.svg +1 -1
  73. data/cockpit/themes/packed/symbols/closed_loop_measuring.svg +1 -1
  74. data/cockpit/themes/packed/symbols/critical.svg +13 -3
  75. data/cockpit/themes/packed/symbols/parallel_branch.svg +1 -1
  76. data/cockpit/themes/packed/symbols/parallel_branch_normal.svg +1 -1
  77. data/cockpit/themes/packed/symbols/terminate.svg +1 -1
  78. data/cockpit/themes/preset/symbols/alternative.svg +2 -2
  79. data/cockpit/themes/preset/symbols/closed_loop.svg +1 -1
  80. data/cockpit/themes/preset/symbols/closed_loop_cancel.svg +1 -1
  81. data/cockpit/themes/preset/symbols/closed_loop_control.svg +1 -1
  82. data/cockpit/themes/preset/symbols/closed_loop_measuring.svg +1 -1
  83. data/cockpit/themes/preset/symbols/critical.svg +13 -3
  84. data/cockpit/themes/preset/symbols/parallel_branch.svg +1 -1
  85. data/cockpit/themes/preset/symbols/parallel_branch_normal.svg +1 -1
  86. data/cockpit/themes/preset/symbols/terminate.svg +1 -1
  87. data/cockpit/themes/preset_model/symbols/alternative.svg +2 -2
  88. data/cockpit/themes/preset_model/symbols/parallel_branch.svg +1 -1
  89. data/cockpit/themes/preset_model/symbols/parallel_branch_normal.svg +1 -1
  90. data/cockpit/themes/preset_model/symbols/terminate.svg +1 -1
  91. data/cockpit/themes/presetaltid/symbols/alternative.svg +2 -2
  92. data/cockpit/themes/presetaltid/symbols/closed_loop.svg +1 -1
  93. data/cockpit/themes/presetaltid/symbols/closed_loop_cancel.svg +1 -1
  94. data/cockpit/themes/presetaltid/symbols/closed_loop_control.svg +1 -1
  95. data/cockpit/themes/presetaltid/symbols/closed_loop_measuring.svg +1 -1
  96. data/cockpit/themes/presetaltid/symbols/critical.svg +13 -3
  97. data/cockpit/themes/presetaltid/symbols/parallel_branch.svg +1 -1
  98. data/cockpit/themes/presetaltid/symbols/parallel_branch_normal.svg +1 -1
  99. data/cockpit/themes/presetaltid/symbols/terminate.svg +1 -1
  100. data/cockpit/themes/presetid/symbols/alternative.svg +2 -2
  101. data/cockpit/themes/presetid/symbols/closed_loop.svg +1 -1
  102. data/cockpit/themes/presetid/symbols/closed_loop_cancel.svg +1 -1
  103. data/cockpit/themes/presetid/symbols/closed_loop_control.svg +1 -1
  104. data/cockpit/themes/presetid/symbols/closed_loop_measuring.svg +1 -1
  105. data/cockpit/themes/presetid/symbols/critical.svg +13 -3
  106. data/cockpit/themes/presetid/symbols/parallel_branch.svg +1 -1
  107. data/cockpit/themes/presetid/symbols/parallel_branch_normal.svg +1 -1
  108. data/cockpit/themes/presetid/symbols/terminate.svg +1 -1
  109. data/cockpit/themes/reduced/symbols/alternative.svg +2 -2
  110. data/cockpit/themes/reduced/symbols/closed_loop.svg +1 -1
  111. data/cockpit/themes/reduced/symbols/closed_loop_cancel.svg +1 -1
  112. data/cockpit/themes/reduced/symbols/closed_loop_control.svg +1 -1
  113. data/cockpit/themes/reduced/symbols/closed_loop_measuring.svg +1 -1
  114. data/cockpit/themes/reduced/symbols/critical.svg +13 -3
  115. data/cockpit/themes/reduced/symbols/parallel_branch.svg +1 -1
  116. data/cockpit/themes/reduced/symbols/parallel_branch_normal.svg +1 -1
  117. data/cockpit/themes/reduced/symbols/terminate.svg +1 -1
  118. data/cpee.gemspec +1 -1
  119. metadata +1 -2
  120. data/cockpit/david.html +0 -292
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bcd03c0a07a2a1e264b5d3f8470ab2b0c1f9e6603b02e9c3448493cf6410d717
4
- data.tar.gz: 4c38994ad48fa9703749b8d675bfa657cbac4f34e31ec17cce66405b486c5ae4
3
+ metadata.gz: 825594df724f06da6073b554297121d71ca0e6745788bf29ef403eb58abdd134
4
+ data.tar.gz: 785e81f35516662bc94bb7b3861e4f8c54cb21d3d9cf131fe8488aa68ec99bc1
5
5
  SHA512:
6
- metadata.gz: 488800a06b5b45929a7b6f0dbad7300d6bdd77c4f7f3865d8e4968e5c3b197243d791346394bc7bbe320b9ece2bd56bb8a675982a7b58a1003a966b1b3fb18be
7
- data.tar.gz: 6225dabee23d8f553b3fb02595995fbc44774d993735e6171ddd6d8961e2035d7e9a547b16395a9bf5dc6d7a5defe762fbdbbce7bdf20d51b06489c6d8f06fb4
6
+ metadata.gz: f47fa192c73abb9072247b58e7e67a975dc794ecfd4efa31b8444c80e995fa3468de253c766e2d667bac028475b6396bdad0af67703a161f3cda033dcaa391a1
7
+ data.tar.gz: 1c9e2df7f50f90ec733b6a004907d8a2d53a6b4ab8669c723bd3828800383abc20fe616f3e6a4369caac5f1724026a29fc6445474e70b46c6303bb6ba2282a73
@@ -58,12 +58,14 @@
58
58
  <script type="text/javascript" src="js/details.js"></script>
59
59
  <script type="text/javascript" src="js/parameters.js"></script>
60
60
  <script type="text/javascript" src="js/extended_columns.js"></script>
61
+ <script type="text/javascript" src="js/edit.js"></script>
61
62
  <script type="text/javascript" src="js/modifiers.js"></script>
62
63
  <script type="text/javascript" src="themes/base.js"></script>
63
64
  <link rel="stylesheet" href="css/ui.css" type="text/css"/>
64
65
  <link rel="stylesheet" href="css/extended_columns-label.css" type="text/css"/>
65
66
  <link rel="stylesheet" href="css/extended_columns-svg.css" type="text/css" data-include-export="true"/>
66
67
  <link rel="stylesheet" href="/global_ui/uicpee.css" type="text/css"/>
68
+ <style></style>
67
69
 
68
70
  <script type="text/javascript" src="js/compliance.js"></script>
69
71
  <link rel="stylesheet" href="css/compliance.css" type="text/css"/>
@@ -137,7 +139,7 @@
137
139
  <ui-tabbed id="instance">
138
140
  <ui-tabbar>
139
141
  <ui-tab class="switch" ></ui-tab>
140
- <ui-tab class="" data-tab="new" id="tabnew" >New</ui-tab>
142
+ <ui-tab class="" data-tab="new" id="tabnew" >Config</ui-tab>
141
143
  <ui-tab class="inactive hidden" data-tab="instance" id="tabinstance" >Instance</ui-tab>
142
144
  <ui-tab class="inactive hidden" data-tab="execution" id="tabexecution">Execution</ui-tab>
143
145
  <ui-behind ><a style='display:none' target='_blank' id='current-instance'></a><a style='display:none' target='_blank' id='current-instance-properties'>P</a><a style='display:none' target='_blank' id='current-instance-subscriptions'>S</a><a style='display:none' target='_blank' id='current-instance-callbacks'>C</a></ui-behind>
@@ -149,17 +151,14 @@
149
151
  <tr>
150
152
  <td>Resources:</td>
151
153
  <td><input name="res-url" type="text" value=""/></td>
152
- <td></td>
153
154
  </tr>
154
155
  <tr>
155
156
  <td>Engine:</td>
156
157
  <td><input name="base-url" type="text" value=""/></td>
157
- <td><button name="base">create new instance</button></td>
158
158
  </tr>
159
159
  <tr>
160
160
  <td>Instance:</td>
161
161
  <td><input name="instance-url" type="text" value=""/></td>
162
- <td><button name="instance">monitor instance</button></td>
163
162
  </tr>
164
163
  </table>
165
164
  </ui-area> <!--}}}-->
@@ -170,7 +169,8 @@
170
169
  <form id='fuckchrome'>
171
170
  <input type='file' name='testsetfile' id='testsetfile'/>
172
171
  </form>
173
- <button title='a template includes various settings, subscriptions or a (partial) model' name="loadtestset">load template</button><button title='a testset includes various settings, subscriptions or a model' name="loadtestsetfile">load testset</button>
172
+ <button title='save a testset includes various settings, subscriptions and a model' name="save" disabled=""><div>save</div><div class="hidden" id='lastsavedline'>(last: <span id="lastsaved"></span>)</div></button>
173
+ <button title='a testset includes various settings, subscriptions or a model' name="loadtestsetfile">load testset</button>
174
174
  </div>
175
175
  <div>
176
176
  <input type='file' name='modelfile' id='modelfile'/>
@@ -238,7 +238,7 @@
238
238
  <ui-tab class="" data-tab="dataelements" id="tabdataelements">Data Objects</ui-tab>
239
239
  <ui-tab class="inactive" data-tab="endpoints" id="tabendpoints" >Endpoints</ui-tab>
240
240
  <ui-tab class="inactive" data-tab="attributes" id="tabattributes" >Attributes</ui-tab>
241
- <ui-tab class="inactive" data-tab="requirements" id="tabrequirements">Requirements</ui-tab>
241
+ <ui-tab class="inactive" data-tab="requirements" id="tabrequirements">Requirements</ui-tab>
242
242
  <ui-behind ></ui-behind>
243
243
  </ui-tabbar>
244
244
  <ui-content>
@@ -274,16 +274,18 @@
274
274
  </ui-tabbar>
275
275
  <ui-content>
276
276
  <ui-area data-belongs-to-tab="details" id='graphcolumn' oncontextmenu='return false'>
277
- <div id="modelling">
277
+ <ui-part id='modelling'>
278
278
  <div id='graphgrid'>
279
279
  <div class="resource-label" style="display: none"></div>
280
280
  <svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:x="http://www.w3.org/1999/xlink" id='graphcanvas' class='graphcolumn' width='1' height='1'></svg>
281
281
  </div>
282
- </div>
282
+ </ui-part>
283
283
  </ui-area>
284
284
  <ui-resizehandle data-belongs-to-tab="details" data-label="drag to resize"></ui-resizehandle>
285
285
  <ui-area data-belongs-to-tab="details" id="detailcolumn">
286
- <div id="dat_details" class='x-ui-layout'></div>
286
+ <ui-part id='details'>
287
+ <div id="dat_details" class='x-ui-layout'></div>
288
+ </ui-part>
287
289
  </ui-area>
288
290
  <ui-area data-belongs-to-tab="dsl" id="areadsl" class="inactive"></ui-area>
289
291
  <ui-area data-belongs-to-tab="log" id="arealog" class="inactive"> <!--{{{-->
data/cockpit/css/llm.css CHANGED
@@ -30,17 +30,6 @@
30
30
  animation: dotty steps(1,end) 1s infinite;
31
31
  content: '';
32
32
  }
33
-
34
- @keyframes dotty {
35
- 0% { content: ''; }
36
- 16% { content: '.'; }
37
- 32% { content: '..'; }
38
- 48% { content: '...'; }
39
- 64% { content: '..'; }
40
- 80% { content: '.'; }
41
- 100% { content: ''; }
42
- }
43
-
44
33
  @keyframes dotty {
45
34
  0% { content: 'ₒₒₒ'; }
46
35
  16% { content: 'ₒₒ∘'; }
@@ -54,22 +43,37 @@
54
43
  #prompt_container {
55
44
  padding: 0.2em 0.5em;
56
45
  outline: none;
57
- min-height: 7.3em;
58
46
  display: flex;
47
+ align-items: stretch;
59
48
  flex-wrap: nowrap;
49
+ flex: 1 1 auto;
50
+ min-height: 0;
60
51
  }
61
52
 
62
- .max {
63
- max-height: 2.66em;
53
+ #input {
54
+ flex: 1 0 auto;
55
+ display: flex;
56
+ flex-direction: column;
57
+ min-height: 9.5em;
64
58
  }
65
59
 
66
60
  .stand_alone {
67
61
  height: 100%;
68
62
  }
63
+
64
+ #details {
65
+ padding-left: 1.5em;
66
+ min-height: 9em;
67
+ }
69
68
  #prompt {
70
69
  flex: 1 1 auto;
70
+ height: 100%;
71
+ overflow: scroll;
71
72
  outline: none;
72
- overflow-y: scroll;
73
+ }
74
+ #prompt_submit_container {
75
+ flex: 0 0 auto;
76
+ align-self: stretch;
73
77
  }
74
78
  #prompt:empty:before {
75
79
  font-family: adwaita-sans;
@@ -85,10 +89,6 @@
85
89
  min-height: 2.66em;
86
90
  }
87
91
 
88
- #llmlabel {
89
- width: 20%;
90
- }
91
-
92
92
  .single {
93
93
  width: 2.3em;
94
94
  height: 2.3em;
@@ -119,7 +119,3 @@
119
119
  #detailcolumn {
120
120
  padding-left: 0em !important;
121
121
  }
122
- #details {
123
- padding-left: 1.5em;
124
- min-height: 7em;
125
- }
data/cockpit/css/ui.css CHANGED
@@ -186,12 +186,9 @@ span.vote {
186
186
  }
187
187
 
188
188
  #details {
189
- flex: 0 1 auto;
190
- height: 100%;
191
189
  overflow: scroll;
192
190
  }
193
191
  #modelling {
194
- flex: 0 1 auto;
195
192
  height: 100%;
196
193
  overflow: scroll;
197
194
  }
@@ -221,6 +218,7 @@ span.vote {
221
218
  padding-left: 1.5em;
222
219
  display: flex;
223
220
  flex-direction: column;
221
+ overflow: hidden;
224
222
  }
225
223
 
226
224
  #dat_log tr:nth-child(odd) { background-color: #e8e8e8; color: #333; }
data/cockpit/edit.html CHANGED
@@ -65,10 +65,7 @@
65
65
  <link rel="stylesheet" href="css/extended_columns-label.css" type="text/css"/>
66
66
  <link rel="stylesheet" href="css/extended_columns-svg.css" type="text/css" data-include-export="true"/>
67
67
  <link rel="stylesheet" href="/global_ui/uicpee.css" type="text/css"/>
68
- <style>
69
- /* has to be fucking inline, because firefox and chrome disagree how to handle filter urls */
70
- /* shit balls, no elegance is left in this world */
71
- </style>
68
+ <style></style>
72
69
  </head>
73
70
  <body data-base-port="8298" data-res-port="9303" data-theme-base="themes" is="x-ui-">
74
71
  <div id='disclaimer' class='hidden'> <!--{{{-->
@@ -268,16 +265,18 @@
268
265
  </ui-tabbar>
269
266
  <ui-content>
270
267
  <ui-area data-belongs-to-tab="details" id='graphcolumn' oncontextmenu='return false'>
271
- <div id="modelling">
268
+ <ui-part id='modelling'>
272
269
  <div id='graphgrid'>
273
270
  <div class="resource-label" style="display: none"></div>
274
271
  <svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:x="http://www.w3.org/1999/xlink" id='graphcanvas' class='graphcolumn' width='1' height='1'></svg>
275
272
  </div>
276
- </div>
273
+ </ui-part>
277
274
  </ui-area>
278
275
  <ui-resizehandle data-belongs-to-tab="details" data-label="drag to resize"></ui-resizehandle>
279
276
  <ui-area data-belongs-to-tab="details" id="detailcolumn">
280
- <div id="dat_details" class='x-ui-layout'></div>
277
+ <ui-part id='details'>
278
+ <div id="dat_details" class='x-ui-layout'></div>
279
+ </ui-part>
281
280
  </ui-area>
282
281
  <ui-area data-belongs-to-tab="dsl" id="areadsl" class="inactive"></ui-area>
283
282
  <ui-area data-belongs-to-tab="log" id="arealog" class="inactive"> <!--{{{-->
data/cockpit/index.html CHANGED
@@ -64,10 +64,7 @@
64
64
  <link rel="stylesheet" href="css/extended_columns-label.css" type="text/css"/>
65
65
  <link rel="stylesheet" href="css/extended_columns-svg.css" type="text/css" data-include-export="true"/>
66
66
  <link rel="stylesheet" href="/global_ui/uicpee.css" type="text/css"/>
67
- <style>
68
- /* has to be fucking inline, because firefox and chrome disagree how to handle filter urls */
69
- /* shit balls, no elegance is left in this world */
70
- </style>
67
+ <style></style>
71
68
  </head>
72
69
  <body data-base-port="8298" data-res-port="9303" data-theme-base="themes" is="x-ui-">
73
70
  <div id='disclaimer' class='hidden'> <!--{{{-->
@@ -269,16 +266,18 @@
269
266
  </ui-tabbar>
270
267
  <ui-content>
271
268
  <ui-area data-belongs-to-tab="details" id='graphcolumn' oncontextmenu='return false'>
272
- <div id="modelling">
269
+ <ui-part id='modelling'>
273
270
  <div id='graphgrid'>
274
271
  <div class="resource-label" style="display: none"></div>
275
272
  <svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:x="http://www.w3.org/1999/xlink" id='graphcanvas' class='graphcolumn' width='1' height='1'></svg>
276
273
  </div>
277
- </div>
274
+ </ui-part>
278
275
  </ui-area>
279
276
  <ui-resizehandle data-belongs-to-tab="details" data-label="drag to resize"></ui-resizehandle>
280
277
  <ui-area data-belongs-to-tab="details" id="detailcolumn">
281
- <div id="dat_details" class='x-ui-layout'></div>
278
+ <ui-part id='details'>
279
+ <div id="dat_details" class='x-ui-layout'></div>
280
+ </ui-part>
282
281
  </ui-area>
283
282
  <ui-area data-belongs-to-tab="dsl" id="areadsl" class="inactive"></ui-area>
284
283
  <ui-area data-belongs-to-tab="log" id="arealog" class="inactive"> <!--{{{-->
@@ -82,7 +82,7 @@ function do_main_work(svgid) { //{{{
82
82
  var tnewnode = ttarget.parents('g.element[element-id]');
83
83
  var tnewtype = tnewnode.attr('element-type') + '_' + tnewnode.attr('element-endpoint');
84
84
 
85
- desc.refresh(function(graphrealization){
85
+ desc.redraw(function(graphrealization){
86
86
  var vtarget = manifestation.adaptor.illustrator.get_node_by_svg_id(svgid);
87
87
  if (vtarget.length > 0) {
88
88
  vtarget.parents('g.element[element-id]').addClass('selected');
@@ -360,6 +360,7 @@ async function sse() { //{{{
360
360
  case 'description':
361
361
  monitor_instance_dsl();
362
362
  monitor_graph_change(false);
363
+ document.dispatchEvent(graph_changed);
363
364
  break;
364
365
  case 'endpoints':
365
366
  monitor_instance_values("endpoints");
@@ -559,7 +560,11 @@ function monitor_instance_values(type,vals) {// {{{
559
560
  });
560
561
  }
561
562
  });
562
- $.when.apply($, deferreds).done();
563
+ $.when.apply($, deferreds).done(function(){
564
+ if (save['graph_adaptor'] && !suspended_redrawing) {
565
+ save['graph_adaptor'].redraw();
566
+ }
567
+ });
563
568
  } else if(type == "attributes") {
564
569
  $(" > attributes > *",res).each((k,v)=>{
565
570
  save['attributes_raw'][v.nodeName] = v.textContent;
@@ -723,12 +728,10 @@ function adaptor_init(url,theme,dslx) { //{{{
723
728
  suspended_redrawing = false;
724
729
  });
725
730
  } else {
726
- save['graph_adaptor'].update(function(graphrealization){
727
- var svgid = manifestation.selected();
728
- graphrealization.set_description($(dslx));
729
- manifestation.events.click(svgid);
730
- format_instance_pos();
731
- });
731
+ var svgid = manifestation.selected();
732
+ save['graph_adaptor'].set_description($(dslx));
733
+ manifestation.events.click(svgid);
734
+ format_instance_pos();
732
735
  }
733
736
  } //}}}
734
737
 
@@ -1402,7 +1405,7 @@ function format_visual_remove(what,cls,sum=true) {//{{{
1402
1405
 
1403
1406
  function scroll_into_view(what) { //{{{
1404
1407
  if (save['state'] != "running") return;
1405
- var tcontainer = $('#graphcolumn')[0];
1408
+ var tcontainer = $('#modelling')[0];
1406
1409
  if ($('g[element-id="' + what + '"]').length > 0) {
1407
1410
  var telement = $('g[element-id="' + what + '"]')[0].getBBox().y;
1408
1411
  if (tcontainer.scrollTop > telement) {
@@ -191,8 +191,6 @@ function WfAdaptor(theme_base,doit) { // Controller {{{
191
191
  this.illustrator = illustrator = new WfIllustrator(this);
192
192
  this.description = description = new WfDescription(this, this.illustrator);
193
193
 
194
- this.update = function(doit){ doit(self); };
195
-
196
194
  this.draw_element = function(type,id,label) {
197
195
  let pos = {'row': 1,'col': 0};
198
196
  let block = { 'max': {'row': pos.row, 'col': pos.col}, 'endnodes': [], 'svg': $X('<g class="group" xmlns="http://www.w3.org/2000/svg"/>') };
@@ -200,8 +198,8 @@ function WfAdaptor(theme_base,doit) { // Controller {{{
200
198
  self.illustrator.set_svg(block);
201
199
  }
202
200
 
203
- this.redraw = function(){
204
- description.redraw();
201
+ this.redraw = function(doit){
202
+ description.redraw(doit);
205
203
  }
206
204
 
207
205
  $.getScript(self.theme_base).done(function() {
@@ -230,6 +228,7 @@ function WfIllustrator(wf_adaptor) { // View {{{
230
228
  this.width_shift = this.width * 0.39;
231
229
  this.width_shift_label = 7;
232
230
  this.group_extend = 1;
231
+ this.structural_tighten = 3; // 'structural' borders are smaller in y
233
232
  this.elements = {}; // the svgs
234
233
  this.svg = {};
235
234
  this.draw = {};
@@ -254,6 +253,9 @@ function WfIllustrator(wf_adaptor) { // View {{{
254
253
  ' <marker id="arrow" viewBox="0 0 10 10" refX="28.5" refY="5" orient="auto" markerUnits="strokeWidth" markerWidth="14" markerHeight="3.5">' +
255
254
  ' <path d="m 2 2 l 6 3 l -6 3 z"/>' +
256
255
  ' </marker>' +
256
+ ' <marker id="endarrow" viewBox="0 0 10 10" refX="7" refY="5" orient="auto" markerUnits="strokeWidth" markerWidth="14" markerHeight="5.2">' +
257
+ ' <path d="M 2,2 L 6.21,4.11 Q 8,5 6.21,5.89 L 2,8 Z"/>' +
258
+ ' </marker>' +
257
259
  ' <clipPath id="startclip">' +
258
260
  ' <rect x="-4" y="-4" width="35" height="38"/>' +
259
261
  ' </clipPath>' +
@@ -774,22 +776,23 @@ function WfIllustrator(wf_adaptor) { // View {{{
774
776
 
775
777
  return g;
776
778
  } // }}}
777
- var draw_border = this.draw.draw_border = function(id, p1, p2, group) { // {{{
779
+ var draw_border = this.draw.draw_border = function(id, p1, p2, group, yshrink) { // {{{
780
+ yshrink = yshrink || 0;
778
781
  let bstart = get_x(p1.row,p1.col,'border from');
779
782
  let bend = get_x_plus(p1.row,p2.row,p2.col,'border to');
780
783
  group.prepend($X('<rect element-id="' + id + '" x="' + (bstart - 1.1 * self.width_shift - self.group_extend) + '" ' +
781
- 'y="' + ((p1.row-1)*self.height+self.height_shift/2-self.group_extend) + '" ' +
784
+ 'y="' + ((p1.row-1)*self.height+self.height_shift/2-self.group_extend+yshrink) + '" ' +
782
785
  'width="' + (bend-bstart+2*self.group_extend) + '" ' +
783
- 'height="' + (((p2.row+1)-p1.row)*self.height+2*self.group_extend) + '" ' +
786
+ 'height="' + (((p2.row+1)-p1.row)*self.height+2*self.group_extend-2*yshrink) + '" ' +
784
787
  'class="block" rx="12" ry="12" xmlns="http://www.w3.org/2000/svg"/>'));
785
788
  } // }}}
786
- var draw_tile = this.draw.draw_tile = function(id, p1, p2, group) { // {{{
789
+ var draw_tile = this.draw.draw_tile = function(id, p1, p2, group, yshrink=0) { // {{{
787
790
  let bstart = get_x(p1.row,p1.col,'tile from');
788
791
  let bend = get_x_plus(p1.row,p2.row,p2.col,'tile to');
789
792
  group.prepend($X('<rect element-id="' + id + '" x="' + (bstart - 1.1 * self.width_shift - self.group_extend) + '" ' +
790
- 'y="' + ((p1.row-1)*self.height+self.height_shift/2-self.group_extend) + '" ' +
793
+ 'y="' + ((p1.row-1)*self.height+self.height_shift/2-self.group_extend+yshrink) + '" ' +
791
794
  'width="' + (bend-bstart+2*self.group_extend) + '" ' +
792
- 'height="' + (((p2.row+1)-p1.row)*self.height+2*self.group_extend) + '" ' +
795
+ 'height="' + (((p2.row+1)-p1.row)*self.height+2*self.group_extend-2*yshrink) + '" ' +
793
796
  'class="tile" rx="12" ry="12" xmlns="http://www.w3.org/2000/svg"/>'));
794
797
  } // }}}
795
798
  var draw_connection = this.draw.draw_connection = function(group, start, end, context_row, arrow) { // {{{
@@ -801,40 +804,40 @@ function WfIllustrator(wf_adaptor) { // View {{{
801
804
  if(((end['row']-start['row']) == 0) && ((end['col']-start['col']) == 0)) return;
802
805
  var line;
803
806
  if (arrow)
804
- line = $X('<path xmlns="http://www.w3.org/2000/svg" class="edge" marker-end="url(#arrow)"/>');
807
+ line = $X('<path xmlns="http://www.w3.org/2000/svg" class="edge" marker-end="url(#' + (end.structural ? 'endarrow' : 'arrow') + ')"/>');
805
808
  else
806
809
  line = $X('<path xmlns="http://www.w3.org/2000/svg" class="edge"/>');
807
810
  if (end['row']-start['row'] == 0 || end['col']-start['col'] == 0) { // straight line
808
- line.attr("d", "M " + String(cstart) + "," + String(start['row']*self.height-15) +" "+
809
- String(cend) + "," + String(end['row']*self.height-15)
811
+ line.attr("d", "M " + String(cstart) + "," + String(start['row']*self.height-15+start.yoffset) +" "+
812
+ String(cend) + "," + String(end['row']*self.height-15+end.yoffset)
810
813
  );
811
814
  } else if (end['row']-start['row'] > 0) { // downwards
812
815
  if (end['col']-start['col'] > 0) {// left - right
813
816
  if (self.compact) {
814
- line.attr("d", "M " + String(cstart) + "," + String(start['row']*self.height-15) +" "+
817
+ line.attr("d", "M " + String(cstart) + "," + String(start['row']*self.height-15+start.yoffset) +" "+
815
818
  String(cstart+14) + "," + String((end['row']-1)*self.height) +" "+ // first turn of horizontal-line going away from node
816
819
  String(cend) + "," + String((end['row']-1)*self.height) +" "+
817
- String(cend) + "," + String(end['row']*self.height-15)
820
+ String(cend) + "," + String(end['row']*self.height-15+end.yoffset)
818
821
  );
819
822
  } else {
820
- line.attr("d", "M " + String(cstart) + "," + String(start['row']*self.height-15) +" "+
821
- String(cend) + "," + String(start['row']*self.height-15) +" "+
822
- String(cend) + "," + String(end['row']*self.height-15)
823
+ line.attr("d", "M " + String(cstart) + "," + String(start['row']*self.height-15+start.yoffset) +" "+
824
+ String(cend) + "," + String(start['row']*self.height-15+start.yoffset) +" "+
825
+ String(cend) + "," + String(end['row']*self.height-15+end.yoffset)
823
826
  );
824
827
  }
825
828
  } else { // right - left
826
- line.attr("d", "M " + String(cstart) + "," + String(start['row']*self.height-15) +" "+
829
+ line.attr("d", "M " + String(cstart) + "," + String(start['row']*self.height-15+start.yoffset) +" "+
827
830
  String(cstart) + "," + String(end['row']*self.height-32) +" "+
828
831
  String(cend+14) + "," + String(end['row']*self.height-32) +" "+ // last turn of horizontal-line going into the node
829
- String(cend) + "," + String(end['row']*self.height-15)
832
+ String(cend) + "," + String(end['row']*self.height-15+end.yoffset)
830
833
  );
831
834
  }
832
835
  } else if(end['row']-start['row'] < 0) { // upwards
833
- line.attr("d", "M " + String(cstart) + "," + String(start['row']*self.height-15) +" "+
836
+ line.attr("d", "M " + String(cstart) + "," + String(start['row']*self.height-15+start.yoffset) +" "+
834
837
  String(cstart) + "," + String((self.dim.symbols.length-1)*self.height+4) +" "+
835
838
  String(cend+15) + "," + String((self.dim.symbols.length-1)*self.height+4) +" "+
836
839
  String(cend+15) + "," + String(end['row']*self.height+15)+" "+
837
- String(cend) + "," + String(end['row']*self.height-15)
840
+ String(cend) + "," + String(end['row']*self.height-15+end.yoffset)
838
841
  );
839
842
  }
840
843
  self.svg.container.append(line);
@@ -890,7 +893,7 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
890
893
  labels = [];
891
894
  let start = performance.now();
892
895
  illustrator.clear();
893
- var graph = parse(description.children('description').get(0), {'row':0,'col':0,final:false,wide:false});
896
+ var graph = parse(description.children('description').get(0), {'row':0,'col':0,final:false,wide:false,yoffset:0});
894
897
  illustrator.set_svg(graph);
895
898
  self.set_labels(graph);
896
899
  illustrator.set_duration(start);
@@ -946,53 +949,38 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
946
949
  used_id_list.push(prefix + id);
947
950
  return prefix + id;
948
951
  } // }}}
949
- var refresh = this.refresh = function(doit) {
950
- id_counter = {};
951
- labels = [];
952
- let start = performance.now();
953
- illustrator.clear();
954
- clean_description();
955
- var graph = parse(description.children('description').get(0), {'row':0,'col':0,final:false,wide:false});
956
- illustrator.set_svg(graph);
957
- self.set_labels(graph);
958
- illustrator.set_duration(start);
959
- doit(self);
960
- }
961
- var redraw = this.redraw = function(){
952
+ var redraw = this.redraw = function(doit) {
962
953
  id_counter = {};
963
954
  let start = performance.now();
964
955
  labels = [];
965
956
  illustrator.clear();
966
957
  clean_description();
967
- var graph = parse(description.children('description').get(0), {'row':0,'col':0,final:false,wide:false});
958
+ var graph = parse(description.children('description').get(0), {'row':0,'col':0,final:false,wide:false,yoffset:0});
968
959
  illustrator.set_svg(graph);
969
960
  self.set_labels(graph);
970
961
  illustrator.set_duration(start);
962
+ if (doit) doit(self);
971
963
  }
972
964
  var update = this.update = function(svgid) { // {{{
973
965
  id_counter = {};
974
- if(update_illustrator){
975
- let start = performance.now();
976
- labels = [];
977
- illustrator.clear();
978
- clean_description();
979
- var graph = parse(description.children('description').get(0), {'row':0,'col':0,final:false,wide:false});
980
- illustrator.set_svg(graph);
981
- self.set_labels(graph);
982
- illustrator.set_duration(start);
966
+ var notify_target = () => {
967
+ var newn = $('*[new=true]',description);
968
+ newn.removeAttr('new');
969
+
970
+ if (newn.attr('svg-id') != undefined)
971
+ adaptor.notify(newn.attr('svg-id'));
972
+ else if (svgid != undefined)
973
+ adaptor.notify(svgid);
974
+ else if (newn.parents('[svg-id]').length > 0)
975
+ adaptor.notify(newn.parent('[svg-id]').attr('svg-id'));
976
+ else
977
+ console.info('Something went horribly wrong');
978
+ };
979
+ if (update_illustrator) {
980
+ self.redraw(notify_target);
981
+ } else {
982
+ notify_target();
983
983
  }
984
-
985
- var newn = $('*[new=true]',description);
986
- newn.removeAttr('new');
987
-
988
- if (newn.attr('svg-id') != undefined)
989
- adaptor.notify(newn.attr('svg-id'));
990
- else if (svgid != undefined)
991
- adaptor.notify(svgid);
992
- else if (newn.parents('[svg-id]').length > 0)
993
- adaptor.notify(newn.parent('[svg-id]').attr('svg-id'));
994
- else
995
- console.info('Something went horribly wrong');
996
984
  } // }}}
997
985
  // }}}
998
986
  // Adaption functions {{{
@@ -1181,6 +1169,16 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
1181
1169
  [undefined, endnodes] = draw_position(ctname,parent_pos,pos,prev,block,[],context,{svg: g, pos: origpos});
1182
1170
  }
1183
1171
  prev = JSON.parse(JSON.stringify(endnodes));
1172
+ if (illustrator.elements[sname].border == 'structural') {
1173
+ // structural border: outgoing arrow starts at the group border instead of leaving from the icon
1174
+ // small y offset
1175
+ prev = prev.map(function(p) {
1176
+ if (!p) return p;
1177
+ var np = JSON.parse(JSON.stringify(p));
1178
+ np.yoffset = illustrator.height_shift/2 + illustrator.group_extend + 15 - illustrator.structural_tighten;
1179
+ return np;
1180
+ });
1181
+ }
1184
1182
  }
1185
1183
  });
1186
1184
 
@@ -1255,18 +1253,20 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
1255
1253
  } else { console.log("no icon "+ sname);}
1256
1254
  if (illustrator.elements[sname] && illustrator.elements[sname].border) {
1257
1255
  let wide = (illustrator.elements[sname].wide == true && block.max.col == pos.col) ? pos.col + 1 : block.max.col;
1256
+ let yshrink = illustrator.elements[sname].border == 'structural' ? illustrator.structural_tighten : 0;
1258
1257
  if (illustrator.elements[sname].closing_symbol) {
1259
- illustrator.draw.draw_border($(context).attr('svg-id'), pos, { col: wide, row: block.max.row + 1 }, block.svg);
1258
+ illustrator.draw.draw_border($(context).attr('svg-id'), pos, { col: wide, row: block.max.row + 1 }, block.svg, yshrink);
1260
1259
  } else {
1261
- illustrator.draw.draw_border($(context).attr('svg-id'), pos, { col: wide, row: block.max.row }, block.svg);
1260
+ illustrator.draw.draw_border($(context).attr('svg-id'), pos, { col: wide, row: block.max.row }, block.svg, yshrink);
1262
1261
  }
1263
1262
  }
1264
1263
  if (illustrator.elements[sname] && illustrator.elements[sname].type == 'complex') {
1265
1264
  let wide = (illustrator.elements[sname].wide == true && block.max.col == pos.col) ? pos.col + 1 : block.max.col;
1265
+ let yshrink = illustrator.elements[sname].border == 'structural' ? illustrator.structural_tighten : 0;
1266
1266
  if (illustrator.elements[sname].closing_symbol) {
1267
- illustrator.draw.draw_tile($(context).attr('svg-id'), pos, { col: wide, row: block.max.row + 1 }, block.svg);
1267
+ illustrator.draw.draw_tile($(context).attr('svg-id'), pos, { col: wide, row: block.max.row + 1 }, block.svg, yshrink);
1268
1268
  } else {
1269
- illustrator.draw.draw_tile($(context).attr('svg-id'), pos, { col: wide, row: block.max.row }, block.svg);
1269
+ illustrator.draw.draw_tile($(context).attr('svg-id'), pos, { col: wide, row: block.max.row }, block.svg, yshrink);
1270
1270
  }
1271
1271
  }
1272
1272
  }
@@ -1274,6 +1274,14 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
1274
1274
 
1275
1275
  // Calculate Connection {{{
1276
1276
  let connection_case = 0;
1277
+ var conn_target = pos;
1278
+ if (illustrator.elements[sname].border == 'structural' && !second) {
1279
+ // structural border: incoming arrow stops at the group border instead of reaching into the icon
1280
+ // (only a pixel-level yoffset, row/col stay integers so get_x() column lookups stay correct)
1281
+ conn_target = JSON.parse(JSON.stringify(pos));
1282
+ conn_target.yoffset = -illustrator.height + illustrator.height_shift/2 - illustrator.group_extend + 15 + illustrator.structural_tighten;
1283
+ conn_target.structural = true;
1284
+ }
1277
1285
  if(illustrator.elements[sname] != undefined && illustrator.elements[sname].closeblock == true) { // Close Block if element e.g. loop
1278
1286
  if (second) {
1279
1287
  if (second.pos.row+1 < pos.row) { // when no content, dont paint the up arrow
@@ -1296,7 +1304,7 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
1296
1304
  } else { endnodes = [JSON.parse(JSON.stringify(pos))]; } // sets this element as only endpoint (aggregate)
1297
1305
  if(prev[0].row == 0 || prev[0].col == 0) { // this enforces the connection from description to the first element
1298
1306
  connection_case = 3;
1299
- illustrator.draw.draw_connection(block.svg, { row: 1, col: 1 }, pos, 0, true);
1307
+ illustrator.draw.draw_connection(block.svg, { row: 1, col: 1, yoffset: 0 }, conn_target, 0, true);
1300
1308
  } else {
1301
1309
  if (illustrator.elements[sname].noarrow == undefined || illustrator.elements[sname].noarrow == false) {
1302
1310
  for (let node=0; node < prev.length; node++) {
@@ -1308,15 +1316,15 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
1308
1316
  }
1309
1317
  connection_case = 4;
1310
1318
  // console.log('++ case 4',prev[node].row,pos.row,illustrator.dim.debug());
1311
- illustrator.draw.draw_connection(block.svg, pn, pos, 0, true);
1319
+ illustrator.draw.draw_connection(block.svg, pn, conn_target, 0, true);
1312
1320
  } else {
1313
1321
  connection_case = 5;
1314
1322
  if (prev.length == 1) {
1315
1323
  // console.log('++ case 5a',parent_pos.row, '---', prev[node].row,pos.row,illustrator.dim.debug());
1316
- illustrator.draw.draw_connection(block.svg, prev[node], pos, 0, true);
1324
+ illustrator.draw.draw_connection(block.svg, prev[node], conn_target, 0, true);
1317
1325
  } else {
1318
1326
  // console.log('++ case 5b',prev[node].row,pos.row,illustrator.dim.debug());
1319
- illustrator.draw.draw_connection(block.svg, prev[node], pos, 0, true);
1327
+ illustrator.draw.draw_connection(block.svg, prev[node], conn_target, 0, true);
1320
1328
  }
1321
1329
  }
1322
1330
  }
@@ -1326,7 +1334,7 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
1326
1334
  if (prev[node] && !prev[node].final) {
1327
1335
  connection_case = 6;
1328
1336
  // console.log('++ case 6',prev[node].row,pos.row,illustrator.dim.debug());
1329
- illustrator.draw.draw_connection(block.svg, prev[node], pos, prev[node].row, false);
1337
+ illustrator.draw.draw_connection(block.svg, prev[node], conn_target, prev[node].row, false);
1330
1338
  }
1331
1339
  }
1332
1340
  }