cpee 2.1.109 → 2.1.111

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cb5004fe53cd5de27b756835cde118bc7eb7f0a8231478d544bd84e1c5ff6408
4
- data.tar.gz: f4940048028217a3d0a21efbe06a76a081792f02e5010a13591908af83732ab2
3
+ metadata.gz: 2328b64e63f8cb6aa07f437e6eb74db8b887f9a19213dedca0b85a87d7ab78a9
4
+ data.tar.gz: e8b3d0b931d7c189c000bba2078b35f4a387e7ef256bcab8fd71d6d0253e7d60
5
5
  SHA512:
6
- metadata.gz: 1d8381762bccbeeb16254c8b26b754b8f369a17d16d323b594cf6d8f04ecebfd43a600764d2babeb26b7663a11c9c39abd2a82d05e352817693c0d063c8f4cf1
7
- data.tar.gz: 70c84b57562d54acf06d4d3567b8ec99b3f2c5648bc137d07b0109f7124f1a6a340db42b9491fe380cf02f6329a4ea3f9cf025cb46263d0fb57f75f4b9194c05
6
+ metadata.gz: 5cc21448cdaa794df412a1102a34a59f1d8c27cf75378596331821c0780984fe613a5214a5e854d9ae06037a8ba3260f4629fd9f66d122acdd58248fdde828cd
7
+ data.tar.gz: e1962692f65c3b65a3abcc195255705a630cecc53b00c33a852f5afb0bb0e9bf45add649cc63c9e1ebcba59d0bbf2391e4afbb9b9a39a9922962d5a9fb193290
@@ -36,5 +36,5 @@ svg.displaylabel text.label {
36
36
  fill: var(--wfadaptor-base);
37
37
  fill-opacity:1;
38
38
  stroke:none;
39
- font-family: adawaita-sans;
39
+ font-family: adwaita-sans;
40
40
  }
@@ -4,17 +4,29 @@ svg rect.border {
4
4
  svg .resource-point.read {
5
5
  fill: green;
6
6
  }
7
+ svg .resource-point.read text {
8
+ font-size: 11px;
9
+ fill: black;
10
+ }
7
11
  svg .resource-point.write {
8
12
  fill: orange;
9
13
  }
14
+ svg .resource-point.write text {
15
+ font-size: 11px;
16
+ fill: black;
17
+ }
10
18
  svg .resource-point.both {
11
19
  fill: blue;
12
20
  }
13
- svg line.resource-column {
14
- stroke: red;
15
- stroke-opacity: 0.1;
21
+ svg .resource-point.both text {
22
+ font-size: 11px;
23
+ fill: black;
24
+ }
25
+ svg rect.resource-column {
26
+ fill: grey;
27
+ fill-opacity: 0.1;
16
28
  }
17
- svg line.resource-column:hover {
18
- stroke: red;
19
- stroke-opacity: 0.2;
29
+ svg rect.resource-column:hover {
30
+ fill: red;
31
+ fill-opacity: 0.1;
20
32
  }
data/cockpit/css/llm.css CHANGED
@@ -38,7 +38,7 @@
38
38
  overflow-y: scroll;
39
39
  }
40
40
  #prompt:empty:before {
41
- font-family: adawaita-sans;
41
+ font-family: adwaita-sans;
42
42
  white-space: normal;
43
43
  content: attr(placeholder);
44
44
  display: block;
data/cockpit/css/ui.css CHANGED
@@ -3,7 +3,7 @@ body {
3
3
  -moz-user-select: -moz-none;
4
4
  -ms-user-select: none;
5
5
  user-select: none;
6
- font-family: adawaita-sans;
6
+ font-family: adwaita-sans;
7
7
  font-size: 1em;
8
8
  }
9
9
 
@@ -42,7 +42,7 @@ svg {
42
42
  display:inline;
43
43
  margin:0;
44
44
  padding:0;
45
- font-family: adawaita-sans;
45
+ font-family: adwaita-sans;
46
46
  user-select: none;
47
47
  }
48
48
 
@@ -223,10 +223,10 @@ svg .grey {
223
223
  stroke-dasharray:none;
224
224
  }
225
225
 
226
- svg.labelsrow text.label {
226
+ svg.labelscolumn text.label {
227
227
  cursor: pointer;
228
228
  }
229
- svg.labelsrow text.label:hover, svg.labelsrow text.label.hover {
229
+ svg.labelscolumn text.label:hover, svg.labelscolumn text.label.hover {
230
230
  fill: var(--wfadaptor-selected-text);
231
231
  }
232
232
 
data/cockpit/david.html CHANGED
@@ -272,7 +272,7 @@
272
272
  <div id="modelling">
273
273
  <div id='graphgrid'>
274
274
  <div class="resource-label" style="display: none"></div>
275
- <svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:x="http://www.w3.org/1999/xlink" id='graphcanvas' width='1' height='1'></svg>
275
+ <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
276
  </div>
277
277
  </div>
278
278
  </ui-area>
data/cockpit/edit.html CHANGED
@@ -271,7 +271,7 @@
271
271
  <div id="modelling">
272
272
  <div id='graphgrid'>
273
273
  <div class="resource-label" style="display: none"></div>
274
- <svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:x="http://www.w3.org/1999/xlink" id='graphcanvas' width='1' height='1'></svg>
274
+ <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
275
  </div>
276
276
  </div>
277
277
  </ui-area>
data/cockpit/graph.html CHANGED
@@ -79,7 +79,7 @@
79
79
  <div id="modelling">
80
80
  <div id='graphgrid'>
81
81
  <div class="resource-label" style="display: none"></div>
82
- <svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:x="http://www.w3.org/1999/xlink" id='graphcanvas' width='1' height='1'></svg>
82
+ <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>
83
83
  </div>
84
84
  </div>
85
85
  </div>
data/cockpit/index.html CHANGED
@@ -272,7 +272,7 @@
272
272
  <div id="modelling">
273
273
  <div id='graphgrid'>
274
274
  <div class="resource-label" style="display: none"></div>
275
- <svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:x="http://www.w3.org/1999/xlink" id='graphcanvas' width='1' height='1'></svg>
275
+ <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
276
  </div>
277
277
  </div>
278
278
  </ui-area>
@@ -3,7 +3,7 @@ function show_dataflow_label(x,y,deg,text) {
3
3
 
4
4
  let clone = $('svg',document.querySelector('#label').content.cloneNode(true));
5
5
  $('text',clone).text(text);
6
- let n = $('body').append(clone);
6
+ $('body').append(clone);
7
7
  let dim = $('text',clone)[0].getBBox();
8
8
  let height = $('rect',clone).attr('height');
9
9
  let width = dim.width + dim.x;
@@ -16,11 +16,16 @@ function show_dataflow_label(x,y,deg,text) {
16
16
 
17
17
  let top = y-shift-top_y;
18
18
  if (top < 0) top = 0;
19
+ if (top < window.scrollY) {
20
+ top = window.scrollY;
21
+ $(clone).attr('data-eq','true');
22
+ }
19
23
  $(clone).css('left',x-top_x);
20
24
  $(clone).css('top',top);
21
25
 
22
26
  $(clone).attr('height',shift + shift_plus + 2);
23
27
  $(clone).attr('width',neigh + 2);
28
+ $(clone).attr('width',neigh + 2);
24
29
  $('g',clone).attr('transform',$('g',clone).attr('transform').replace(/%%1/, shift + 1).replace(/%%2/, deg));
25
30
  $('rect',clone).attr('width',width);
26
31
  }
@@ -29,13 +34,34 @@ function show_dataflow_row_label(data) {
29
34
  let pos = data.getBoundingClientRect();
30
35
  let pos_top = $('#graphgrid').parent()[0].getBoundingClientRect();
31
36
  let pos_y;
32
- let text = $('text',data).text();
37
+ let text = $('text.label',data).text();
33
38
  if (pos.y < (pos_top.y + 10)) {
34
39
  pos_y = pos_top.y + 10;
35
40
  } else {
36
41
  pos_y = pos.y;
37
42
  }
38
- show_dataflow_label(pos.x + 12, pos_y, 60, text);
43
+ show_dataflow_label(pos.x + window.scrollX + 12, pos_y + window.scrollY , 60, text);
44
+ }
45
+
46
+ function show_dataflow_row_labels() {
47
+ $('.displaylabel').remove();
48
+ let top = 0;
49
+ if (manifestation.adaptor.properties['always'] == 'true') {
50
+ $('.resource-column',manifestation.adaptor.illustrator.svg.label_container).each((_,ele)=>{
51
+ show_dataflow_row_label(ele);
52
+ });
53
+ }
54
+ let height = 0;
55
+ $('svg.displaylabel').each((_,e)=>{
56
+ if ($(e).attr('data-eq') == 'true') {
57
+ if ($(e).attr('height') > height) { height = parseFloat($(e).attr('height')); }
58
+ }
59
+ });
60
+ $('svg.displaylabel').each((_,e)=>{
61
+ if ($(e).attr('data-eq') == 'true') {
62
+ $(e).css('top',window.scrollY + height - parseFloat($(e).attr('height')));
63
+ }
64
+ });
39
65
  }
40
66
 
41
67
  function draw_extended_columns(graphrealization,max,labels,dimensions,striped) {
@@ -49,7 +75,7 @@ function draw_extended_columns(graphrealization,max,labels,dimensions,striped) {
49
75
  graphrealization.illustrator.svg.label_container.removeClass('striped');
50
76
  }
51
77
 
52
- $('.labelsrow, .graphlast').remove();
78
+ $('.labelscolumn, .graphlast').remove();
53
79
  let tcolumns = [];
54
80
  let tcolumntype = {};
55
81
  let tcolumncount = {}
@@ -87,7 +113,7 @@ function draw_extended_columns(graphrealization,max,labels,dimensions,striped) {
87
113
  mapPoints.set(k, p);
88
114
  }
89
115
 
90
- let tsvg = $X('<g xmlns="http://www.w3.org/2000/svg" class="resource-row" element-row="' + (val.row-1) + '"></g>');
116
+ let tsvg = $X('<g xmlns="http://www.w3.org/2000/svg" class="resource-row" element-id="' + val.element_id + '" element-row="' + (val.row-1) + '"></g>');
91
117
 
92
118
  var cx = space;
93
119
  var count = 0;
@@ -100,14 +126,26 @@ function draw_extended_columns(graphrealization,max,labels,dimensions,striped) {
100
126
  let inner;
101
127
 
102
128
  if (p.AR == "Read") {
103
- inner = $X('<polygon xmlns="http://www.w3.org/2000/svg" resource-column="' + count + '" points="' + (p.x) + ',' + pos + ' ' + (p.x + iconsize) + ',' + (pos + iconsize/2) + ' ' + (p.x + iconsize) + ',' + (pos - iconsize/2) + '" class="resource-point read"></polygon>');
129
+ inner = $X('<g xmlns="http://www.w3.org/2000/svg" class="resource-point read" resource-column="' + count + '"><polygon class="target" points="' + (p.x) + ',' + pos + ' ' + (p.x + iconsize) + ',' + (pos + iconsize/2) + ' ' + (p.x + iconsize) + ',' + (pos - iconsize/2) + '"></polygon></g>');
130
+ if (manifestation.adaptor.properties['iolabels'] == 'true') {
131
+ inner.append($X('<text xmlns="http://www.w3.org/2000/svg" x="' + (p.x + 3) + '" y="' + (pos+12) + '">r</text>'));
132
+ }
104
133
  if (pos == p.y0) { firstAssignFlag = true; }
105
134
  } else if (p.AR == "Assign") { // Define points for a triangle pointing to the left
106
- inner = $X('<polygon xmlns="http://www.w3.org/2000/svg" resource-column="' + count + '" points="' + (p.x + iconsize) + ',' + pos + ' ' + (p.x) + ',' + (pos + iconsize/2) + ' ' + (p.x) + ',' + (pos - iconsize/2) + '" class="resource-point write"></polygon>');
135
+ inner = $X('<g xmlns="http://www.w3.org/2000/svg" class="resource-point write" resource-column="' + count + '"><polygon class="target" points="' + (p.x + iconsize) + ',' + pos + ' ' + (p.x) + ',' + (pos + iconsize/2) + ' ' + (p.x) + ',' + (pos - iconsize/2) + '"></polygon></g>');
136
+ if (manifestation.adaptor.properties['iolabels'] == 'true') {
137
+ inner.append($X('<text xmlns="http://www.w3.org/2000/svg" x="' + (p.x) + '" y="' + (pos+12) + '">w</text>'));
138
+ }
107
139
  } else if (p.AR == "AssignRead") {
108
- inner = $X('<circle xmlns="http://www.w3.org/2000/svg" resource-column="' + count + '" cx="' + (p.x + iconsize/2) + '" cy="' + pos + '" r="' + (iconsize / 2) + '" class="resource-point both"></circle>');
140
+ inner = $X('<g xmlns="http://www.w3.org/2000/svg" class="resource-point both" resource-column="' + count + '"><circle class="target" cx="' + (p.x + iconsize/2) + '" cy="' + pos + '" r="' + (iconsize / 2) + '"></circle></g>');
141
+ if (manifestation.adaptor.properties['iolabels'] == 'true') {
142
+ inner.append($X('<text xmlns="http://www.w3.org/2000/svg" x="' + (p.x-1.5) + '" y="' + (pos+13) + '">rw</text>'));
143
+ }
109
144
  } else if (p.AR == "ReadAssign") {
110
- inner = $X('<circle xmlns="http://www.w3.org/2000/svg" resource-column="' + count + '" cx="' + (p.x + iconsize/2) + '" cy="' + pos + '" r="' + (iconsize / 2) + '" class="resource-point both"></circle>');
145
+ inner = $X('<g xmlns="http://www.w3.org/2000/svg" class="resource-point both" resource-column="' + count + '"><circle class="target" cx="' + (p.x + iconsize/2) + '" cy="' + pos + '" r="' + (iconsize / 2) + '"></circle></g>');
146
+ if (manifestation.adaptor.properties['iolabels'] == 'true') {
147
+ inner.append($X('<text xmlns="http://www.w3.org/2000/svg" x="' + (p.x-1.5) + '" y="' + (pos+13) + '">rw</text>'));
148
+ }
111
149
  if (pos == p.y0) { firstAssignFlag = true; }
112
150
  }
113
151
 
@@ -116,7 +154,7 @@ function draw_extended_columns(graphrealization,max,labels,dimensions,striped) {
116
154
  p.ymax = pos;
117
155
  }
118
156
 
119
- inner.append($X('<text xmlns="http://www.w3.org/2000/svg"></text>').text(k));
157
+ inner.children().first().append($X('<text class="label" xmlns="http://www.w3.org/2000/svg"></text>').text(k));
120
158
  tsvg.append(inner);
121
159
  }
122
160
 
@@ -126,7 +164,12 @@ function draw_extended_columns(graphrealization,max,labels,dimensions,striped) {
126
164
  if (tcolumnsvgs[col.column][1] == undefined) {
127
165
  tcolumnsvgs[col.column][1] = $X('<g xmlns="http://www.w3.org/2000/svg" class="resource-row" element-row="' + 0 + '"></g>');
128
166
  }
129
- tcolumnsvgs[col.column][1].append($X('<polygon xmlns="http://www.w3.org/2000/svg" resource-column="' + count + '" points="' + (p.x + iconsize) + ',' + firstpos + ' ' + (p.x) + ',' + (firstpos + iconsize/2) + ' ' + (p.x) + ',' + (firstpos - iconsize/2) + '" class="resource-point write"></polygon>').append($X('<text xmlns="http://www.w3.org/2000/svg"></text>').text(k)));
167
+ let i = $X('<g xmlns="http://www.w3.org/2000/svg" class="resource-point write" resource-column="' + count + '"><polygon class="target" points="' + (p.x + iconsize) + ',' + firstpos + ' ' + (p.x) + ',' + (firstpos + iconsize/2) + ' ' + (p.x) + ',' + (firstpos - iconsize/2) + '"></polygon></g>');
168
+ if (manifestation.adaptor.properties['iolabels'] == 'true') {
169
+ i.append($X('<text xmlns="http://www.w3.org/2000/svg" x="' + (p.x) + '" y="' + (firstpos+12) + '">w</text>'));
170
+ }
171
+ i.children().first().append($X('<text class="label" xmlns="http://www.w3.org/2000/svg"></text>').text(k));
172
+ tcolumnsvgs[col.column][1].append(i);
130
173
  }
131
174
  cx += iconsize + space;
132
175
  count += 1;
@@ -136,11 +179,8 @@ function draw_extended_columns(graphrealization,max,labels,dimensions,striped) {
136
179
  tcolumnsvgs[col.column][val.row] = tsvg;
137
180
  }
138
181
  } else {
139
- tsvg = $X('<text class="label" element-id="' + val.element_id + '" x="' + space + '" y="' + (dimensions.height * val.row - dimensions.height_shift) + '" xmlns="http://www.w3.org/2000/svg"></text>')
182
+ tsvg = $X('<text class="label" element-row="' + (val.row - 1) + '" element-id="' + val.element_id + '" x="' + space + '" y="' + (dimensions.height * val.row - dimensions.height_shift) + '" xmlns="http://www.w3.org/2000/svg"></text>')
140
183
  tsvg.text(col.value);
141
- tsvg.mouseover(function(ev){ manifestation.events.mouseover($(ev.currentTarget).attr('element-id')); });
142
- tsvg.mouseout(function(ev){ manifestation.events.mouseout($(ev.currentTarget).attr('element-id')); });
143
- tsvg.click(function(ev){ manifestation.events.click($(ev.currentTarget).attr('element-id'),ev); });
144
184
  tcolumnsvgs[col.column][val.row] = tsvg;
145
185
  }
146
186
 
@@ -157,7 +197,7 @@ function draw_extended_columns(graphrealization,max,labels,dimensions,striped) {
157
197
 
158
198
  tcolumns.forEach(h => {
159
199
  if (Object.keys(tcolumnsvgs[h]).length > 0) {
160
- const svgcolumn = $X('<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:x="http://www.w3.org/1999/xlink" class="labelsrow"></svg>');
200
+ const svgcolumn = $X('<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:x="http://www.w3.org/1999/xlink" class="labelscolumn"></svg>');
161
201
  const svgback = $X('<g xmlns="http://www.w3.org/2000/svg"></g>');
162
202
  const svgfront = $X('<g xmlns="http://www.w3.org/2000/svg"></g>');
163
203
  let xwidth = 0;
@@ -182,7 +222,7 @@ function draw_extended_columns(graphrealization,max,labels,dimensions,striped) {
182
222
  if (tcolumntype[h] == 'resource' || tcolumntype[h] == 'bodsod') {
183
223
  let count = 0;
184
224
  for (const [k, p] of mapPoints) {
185
- svgback.append($X('<line xmlns="http://www.w3.org/2000/svg" resource-column="' + count + '" x1="' + (p.x + iconsize/2) + '" y1="' + p.y0 + '" x2="' + (p.x + iconsize/2) + '" y2="' + (p.ymax + 0.01) + '" class="' + tcolumntype[h] + '-column" stroke-width="' + iconsize + '"><text>' + k + '</text></line>'));
225
+ svgback.append($X('<rect xmlns="http://www.w3.org/2000/svg" resource-column="' + count + '" x="' + p.x + '" y="' + p.y0 + '" width="' + iconsize + '" height="' + (p.ymax - p.y0 + 0.01) + '" class="' + tcolumntype[h] + '-column"><text class="label">' + k + '</text></rect>'));
186
226
  count += 1;
187
227
  }
188
228
  }
@@ -193,6 +233,8 @@ function draw_extended_columns(graphrealization,max,labels,dimensions,striped) {
193
233
  }
194
234
  });
195
235
 
236
+ show_dataflow_row_labels();
237
+
196
238
  return tcolumns.length;
197
239
  }
198
240
 
@@ -201,11 +243,25 @@ $(document).ready(function() {
201
243
  var clicked_label;
202
244
  $('#graphgrid').on('mouseout','svg .resource-column, svg .resource-point',(data)=>{
203
245
  if (clicked_label != current_label) {
204
- $('.displaylabel').remove();
246
+ let rc = $(current_label).attr('resource-column');
247
+ $('.resource-point[resource-column=' + rc + ']').each((_,e)=>{
248
+ let svgid = $(e).parent('g').attr('element-id');
249
+ manifestation.events.mouseout(svgid);
250
+ });
251
+
252
+ show_dataflow_row_labels();
205
253
  clicked_label = undefined;
206
254
  current_label = undefined;
207
255
  }
208
256
  });
257
+ $(window).scroll((data)=>{
258
+ if (current_label != undefined) {
259
+ $('.displaylabel').remove();
260
+ show_dataflow_row_label(current_label);
261
+ } else {
262
+ show_dataflow_row_labels();
263
+ }
264
+ });
209
265
  $('#graphcolumn').scroll((data)=>{
210
266
  if (current_label != undefined) {
211
267
  $('.displaylabel').remove();
@@ -218,16 +274,47 @@ $(document).ready(function() {
218
274
  clicked_label = data.target;
219
275
  });
220
276
  $('#graphgrid').on('mouseover','svg .resource-column',(data)=>{
277
+ $('.displaylabel').remove();
221
278
  show_dataflow_row_label(data.target);
222
279
  current_label = data.target;
280
+
281
+ let rc = $(data.target).attr('resource-column');
282
+ $('.resource-point[resource-column=' + rc + ']').each((_,e)=>{
283
+ let svgid = $(e).parent('g').attr('element-id');
284
+ manifestation.events.mouseover(svgid);
285
+ });
286
+ });
287
+ $('#graphgrid').on('mouseover','svg .resource-point',(data)=>{
288
+ $('.displaylabel').remove();
289
+ let tar = $(data.currentTarget);
290
+ let rc = tar.attr('resource-column');
291
+ let rct = $('.resource-column[resource-column=' + rc + ']')[0];
292
+
293
+ let pos = tar.find('.target')[0].getBoundingClientRect();
294
+ let text = $('text.label',tar).text();
295
+ show_dataflow_label(pos.x + window.scrollX + 12, pos.y + window.scrollY + 5, 60, text);
296
+
297
+ let svgid = tar.parent().attr('element-id');
298
+ manifestation.events.mouseover(svgid);
299
+ current_label = rct;
300
+ });
301
+
302
+ $('#graphgrid').on('mouseover','svg.labelscolumn text.label, svg.graphcolumn g.element',(ev)=>{
303
+ $('.displaylabel').remove();
304
+ let svgid = $(ev.currentTarget).attr('element-id');
305
+ manifestation.events.mouseover(svgid);
306
+ let er = manifestation.adaptor.illustrator.svg.container.find('[element-id = "' + svgid + '"][element-row]').attr('element-row');
307
+ $('.resource-row[element-row=' + er + '] .resource-point .target').each((_,e) => {
308
+ let pos = e.getBoundingClientRect();
309
+ let text = $('text.label',e).text();
310
+ show_dataflow_label(pos.x + window.scrollX + 12, pos.y + window.scrollY + 5, 60, text);
311
+ })
312
+ });
313
+ $('#graphgrid').on('mouseout','svg.labelscolumn text.label, svg.graphcolumn g.element',(ev)=>{
314
+ manifestation.events.mouseout($(ev.currentTarget).attr('element-id'));
315
+ show_dataflow_row_labels();
223
316
  });
224
- $('#graphgrid').on('mouseover','svg .resource-point',(ev)=>{
225
- let rc = $(ev.target).attr('resource-column');
226
- let data = $('.resource-column[resource-column=' + rc + ']')[0];
227
- show_dataflow_row_label(data);
228
- current_label = data;
229
- // let pos = data.target.getBoundingClientRect();
230
- // let text = $('text',data.target).text();
231
- // show_dataflow_label(pos.x + 12, pos.y + 5, 60, text);
317
+ $('#graphgrid').on('click','svg.labelscolumn text.label, svg.graphcolumn g.element',(ev)=>{
318
+ manifestation.events.click($(ev.currentTarget).attr('element-id'),ev);
232
319
  });
233
320
  });
@@ -123,7 +123,16 @@ function cockpit() { //{{{
123
123
  document.addEventListener('uidash:activate_tab', function (e) {
124
124
  if (!$('#tabdetails').hasClass('inactive')) {
125
125
  if (save['graph_adaptor']) {
126
+ var svgid = manifestation.selected();
127
+ var marks = manifestation.marked();
126
128
  save['graph_adaptor'].redraw();
129
+ let vtarget = manifestation.adaptor.illustrator.get_node_by_svg_id(svgid);
130
+ if (vtarget.length > 0) { vtarget.parents('g.element[element-id]').addClass('selected'); }
131
+ format_instance_pos();
132
+ marks.forEach((svgid) => {
133
+ let vtarget = manifestation.adaptor.illustrator.get_node_by_svg_id(svgid);
134
+ if (vtarget.length > 0) { vtarget.parents('g.element[element-id]').addClass('marked'); }
135
+ });
127
136
  }
128
137
  }
129
138
  });
@@ -441,11 +450,15 @@ function monitor_instance(cin,rep,load,exec) {// {{{
441
450
  });
442
451
  }// }}}
443
452
 
453
+ function translate_endpoint(ep) {
454
+ return ep.replace(/\{[^\/\}]+\}/,'*');
455
+ }
456
+
444
457
  function get_resource(base, key, loc, cache) {
445
458
  cache[key] = {};
446
459
  let deferreds = [new $.Deferred(), new $.Deferred(), new $.Deferred()];
447
460
  $.ajax({
448
- url: base + 'endpoints/' + encodeURIComponent(loc) + "/symbol.svg",
461
+ url: base + 'endpoints/' + encodeURIComponent(translate_endpoint(loc)) + "/symbol.svg",
449
462
  success: function(res) {
450
463
  cache[key]['symbol'] = res;
451
464
  deferreds[0].resolve(true);
@@ -453,7 +466,7 @@ function get_resource(base, key, loc, cache) {
453
466
  error: deferreds[0].resolve
454
467
  })
455
468
  $.ajax({
456
- url: base + 'endpoints/' + encodeURIComponent(loc) + "/schema.rng",
469
+ url: base + 'endpoints/' + encodeURIComponent(translate_endpoint(loc)) + "/schema.rng",
457
470
  success: function(res) {
458
471
  cache[key]['schema'] = res;
459
472
  deferreds[1].resolve(true);
@@ -461,7 +474,7 @@ function get_resource(base, key, loc, cache) {
461
474
  error: deferreds[1].resolve
462
475
  })
463
476
  $.ajax({
464
- url: base + 'endpoints/' + encodeURIComponent(loc) + "/properties.json",
477
+ url: base + 'endpoints/' + encodeURIComponent(translate_endpoint(loc)) + "/properties.json",
465
478
  success: function(res) {
466
479
  cache[key]['properties'] = res;
467
480
  deferreds[2].resolve(true);
@@ -510,7 +523,7 @@ function monitor_instance_values(type,vals) {// {{{
510
523
  let def = new $.Deferred();
511
524
  deferreds.push(def);
512
525
  $.ajax({
513
- url: rep + 'endpoints/' + encodeURIComponent($(v).text()),
526
+ url: rep + 'endpoints/' + encodeURIComponent(translate_endpoint($(v).text())),
514
527
  success: () => {
515
528
  tmp[v.tagName] = {};
516
529
  $.when.apply($, get_resource(rep,v.tagName,$(v).text(),tmp)).then(function(x) {
@@ -527,10 +540,10 @@ function monitor_instance_values(type,vals) {// {{{
527
540
  let defr = new $.Deferred();
528
541
  deferreds.push(defr);
529
542
  $.ajax({
530
- url: rep + 'endpoints/' + encodeURIComponent(encodeURIComponent($(v).text())),
543
+ url: rep + 'endpoints/' + encodeURIComponent(encodeURIComponent(translate_endpoint($(v).text()))),
531
544
  success: () => {
532
545
  tmp[v.tagName] = {};
533
- $.when.apply($, get_resource(rep,v.tagName,encodeURIComponent($(v).text()),tmp)).then(function(x) {
546
+ $.when.apply($, get_resource(rep,v.tagName,encodeURIComponent(translate_endpoint($(v).text())),tmp)).then(function(x) {
534
547
  save['endpoints_cache'] = tmp;
535
548
  def.resolve();
536
549
  // when updating attributes clear the attributes, because they might change as well. New arguments are possible.
@@ -1031,6 +1044,7 @@ function save_svgfile() {// {{{
1031
1044
  });
1032
1045
  gc.find('.selected').removeClass('selected');
1033
1046
  var varreps = {};
1047
+ var ffamily = '';
1034
1048
  $(window.document.styleSheets).each(function(i,x){
1035
1049
  if (x && x.href && x.ownerNode.attributes.getNamedItem('data-include-export')) {
1036
1050
  $(x.cssRules).each(function(j,y){
@@ -1039,6 +1053,13 @@ function save_svgfile() {// {{{
1039
1053
  varreps['var\\(' + z + '\\)'] = getComputedStyle(document.documentElement).getPropertyValue(z).toString();
1040
1054
  });
1041
1055
  }
1056
+ if (y.selectorText == "svg") {
1057
+ $(y.style).each(function(k,z) {
1058
+ if (z == 'font-family') {
1059
+ ffamily = getComputedStyle($('#graphgrid > svg')[0]).getPropertyValue(z).toString();
1060
+ }
1061
+ });
1062
+ }
1042
1063
  var loc = $(gc).find(y.selectorText.replace(/svg /g,''));
1043
1064
  var cst = y.style.cssText;
1044
1065
  for (k in varreps) {
@@ -1049,8 +1070,13 @@ function save_svgfile() {// {{{
1049
1070
  $(loco).attr('style',cst + sty);
1050
1071
  });
1051
1072
  });
1052
- var loc = $(gc).find('text.super');
1053
- loc.attr('style',loc.attr('style') + ' display: none; ');
1073
+ $(gc).find('text.super,g.hoverstyle,g.markstyle').each(function(k,loco){
1074
+ $(loco).attr('style',$(loco).attr('style') + ' display: none; ');
1075
+ });
1076
+ ffamily = ffamily.replace(/-/,' ').split(' ').map(function(word) { return word[0].toUpperCase() + word.substr(1); }).join(' ');
1077
+ $(gc).find('text').each(function(k,loco){
1078
+ $(loco).attr('style',$(loco).attr('style') + ' font-family: \'' + ffamily + '\'; ');
1079
+ });
1054
1080
  }
1055
1081
  });
1056
1082
  gc.attr('width',start+1);
@@ -26,12 +26,13 @@ var high;
26
26
  // e.g. Event fires to Adaptor to insert Element and Illustrator and Description do it
27
27
  function WfAdaptor(theme_base,doit) { // Controller {{{
28
28
 
29
- // public variables {{{
29
+ // public variables {{{
30
30
  this.illustrator;
31
31
  this.description;
32
32
  this.elements = {};
33
33
  this.theme_base = theme_base;
34
34
  this.theme_dir = theme_base.replace(/theme.js/,'');
35
+ this.properties = {};
35
36
  // }}}
36
37
 
37
38
  // private variables {{{
@@ -1146,7 +1147,7 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
1146
1147
  if(root.tagName == 'description' && illustrator.elements[root.tagName].closing_symbol) {
1147
1148
  pos.row++;
1148
1149
  max.row = pos.row;
1149
- draw_position(illustrator.elements['start'].closing_symbol,parent_pos,pos,prev,block,[],this,{svg: block.svg, pos: pos});
1150
+ draw_position(illustrator.elements['start'].closing_symbol,parent_pos,pos,prev,block,[],root,{svg: block.svg, pos: pos});
1150
1151
  }
1151
1152
 
1152
1153
  return {'endnodes': endnodes, 'max':max, 'svg': block.svg};
data/cockpit/llm.html CHANGED
@@ -267,7 +267,7 @@
267
267
  <div id="modelling">
268
268
  <div id='graphgrid'>
269
269
  <div class="resource-label" style="display: none"></div>
270
- <svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:x="http://www.w3.org/1999/xlink" id='graphcanvas' width='1' height='1'></svg>
270
+ <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>
271
271
  </div>
272
272
  </div>
273
273
  <div id='status'></div>
@@ -269,7 +269,7 @@
269
269
  <div id="modelling">
270
270
  <div id='graphgrid'>
271
271
  <div class="resource-label" style="display: none"></div>
272
- <svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:x="http://www.w3.org/1999/xlink" id='graphcanvas' width='1' height='1'></svg>
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>
273
273
  </div>
274
274
  </div>
275
275
  <div id='status'></div>
data/cockpit/model.html CHANGED
@@ -180,7 +180,7 @@
180
180
  <ui-area data-belongs-to-tab="details" id='graphcolumn' oncontextmenu='return false'>
181
181
  <div id="modelling">
182
182
  <div id='graphgrid'>
183
- <svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:x="http://www.w3.org/1999/xlink" id='graphcanvas' width='1' height='1'></svg>
183
+ <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>
184
184
  </div>
185
185
  </div>
186
186
  </ui-area>
@@ -244,7 +244,7 @@
244
244
  <ui-area data-belongs-to-tab="details" id="detailcolumn">
245
245
  <div id='graphgrid'>
246
246
  <div class="resource-label" style="display: none"></div>
247
- <svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:x="http://www.w3.org/1999/xlink" id='graphcanvas' width='1' height='1'></svg>
247
+ <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>
248
248
  </div>
249
249
  </ui-area>
250
250
  <ui-area data-belongs-to-tab="log" id="arealog" class="inactive"> <!--{{{-->