@yuneta/gobj-ui 7.23.22 → 7.23.23
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/dist/gobj-ui.cjs.js +12 -1
- package/dist/gobj-ui.es.js +12 -1
- package/package.json +1 -1
- package/src/c_yui_json_graph.js +39 -0
package/dist/gobj-ui.cjs.js
CHANGED
|
@@ -11188,6 +11188,12 @@ function build_json_nodes(gobj, path, kw, nodes, edges, parent_id, parent_port)
|
|
|
11188
11188
|
${content_html}
|
|
11189
11189
|
</div>`;
|
|
11190
11190
|
let ports = [];
|
|
11191
|
+
if (parent_id) ports.push({
|
|
11192
|
+
key: "in",
|
|
11193
|
+
placement: [.5, 0],
|
|
11194
|
+
fill: colors.border,
|
|
11195
|
+
stroke: colors.border
|
|
11196
|
+
});
|
|
11191
11197
|
for (let pending of pending_complex) {
|
|
11192
11198
|
let child_colors = json_card_style((0, _yuneta_gobj_js.is_object)(pending.value) ? GROUP_COLORS.dict : GROUP_COLORS.list, dark);
|
|
11193
11199
|
let row_mid = CARD_HEADER_H$1 + pending.row * CARD_ROW_H$1 + CARD_ROW_H$1 / 2;
|
|
@@ -11223,7 +11229,12 @@ function build_json_nodes(gobj, path, kw, nodes, edges, parent_id, parent_port)
|
|
|
11223
11229
|
target: group_id,
|
|
11224
11230
|
style: {
|
|
11225
11231
|
stroke: colors.border,
|
|
11226
|
-
lineWidth: 1
|
|
11232
|
+
lineWidth: 1,
|
|
11233
|
+
endArrow: true,
|
|
11234
|
+
endArrowSize: 8,
|
|
11235
|
+
endArrowFill: colors.border,
|
|
11236
|
+
endArrowStroke: colors.border,
|
|
11237
|
+
targetPort: "in"
|
|
11227
11238
|
}
|
|
11228
11239
|
};
|
|
11229
11240
|
if (parent_port) edge.style.sourcePort = parent_port;
|
package/dist/gobj-ui.es.js
CHANGED
|
@@ -11183,6 +11183,12 @@ function build_json_nodes(gobj, path, kw, nodes, edges, parent_id, parent_port)
|
|
|
11183
11183
|
${content_html}
|
|
11184
11184
|
</div>`;
|
|
11185
11185
|
let ports = [];
|
|
11186
|
+
if (parent_id) ports.push({
|
|
11187
|
+
key: "in",
|
|
11188
|
+
placement: [.5, 0],
|
|
11189
|
+
fill: colors.border,
|
|
11190
|
+
stroke: colors.border
|
|
11191
|
+
});
|
|
11186
11192
|
for (let pending of pending_complex) {
|
|
11187
11193
|
let child_colors = json_card_style(is_object(pending.value) ? GROUP_COLORS.dict : GROUP_COLORS.list, dark);
|
|
11188
11194
|
let row_mid = CARD_HEADER_H$1 + pending.row * CARD_ROW_H$1 + CARD_ROW_H$1 / 2;
|
|
@@ -11218,7 +11224,12 @@ function build_json_nodes(gobj, path, kw, nodes, edges, parent_id, parent_port)
|
|
|
11218
11224
|
target: group_id,
|
|
11219
11225
|
style: {
|
|
11220
11226
|
stroke: colors.border,
|
|
11221
|
-
lineWidth: 1
|
|
11227
|
+
lineWidth: 1,
|
|
11228
|
+
endArrow: true,
|
|
11229
|
+
endArrowSize: 8,
|
|
11230
|
+
endArrowFill: colors.border,
|
|
11231
|
+
endArrowStroke: colors.border,
|
|
11232
|
+
targetPort: "in"
|
|
11222
11233
|
}
|
|
11223
11234
|
};
|
|
11224
11235
|
if (parent_port) edge.style.sourcePort = parent_port;
|
package/package.json
CHANGED
package/src/c_yui_json_graph.js
CHANGED
|
@@ -1181,6 +1181,28 @@ function build_json_nodes(gobj, path, kw, nodes, edges, parent_id, parent_port)
|
|
|
1181
1181
|
* the one thing the port can say that the row does not.
|
|
1182
1182
|
*/
|
|
1183
1183
|
let ports = [];
|
|
1184
|
+
|
|
1185
|
+
/*
|
|
1186
|
+
* The port a line ARRIVES at: one per card, above the title and
|
|
1187
|
+
* centred, and only on a card that has a parent -- the root
|
|
1188
|
+
* receives nothing, so a dot there would mark a door onto nothing.
|
|
1189
|
+
*
|
|
1190
|
+
* One and not one-per-parent because a card has exactly ONE parent
|
|
1191
|
+
* in a JSON document: what varies is which key of that parent it
|
|
1192
|
+
* hangs from, and that is what the source ports say.
|
|
1193
|
+
*
|
|
1194
|
+
* Keyed `in` with no prefix, which is why the key ports carry one:
|
|
1195
|
+
* no `p_<key>` can ever collide with it.
|
|
1196
|
+
*/
|
|
1197
|
+
if(parent_id) {
|
|
1198
|
+
ports.push({
|
|
1199
|
+
key: "in",
|
|
1200
|
+
placement: [0.5, 0],
|
|
1201
|
+
fill: colors.border,
|
|
1202
|
+
stroke: colors.border,
|
|
1203
|
+
});
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1184
1206
|
for(let pending of pending_complex) {
|
|
1185
1207
|
let child_colors = json_card_style(
|
|
1186
1208
|
is_object(pending.value)? GROUP_COLORS.dict: GROUP_COLORS.list, dark
|
|
@@ -1224,6 +1246,23 @@ function build_json_nodes(gobj, path, kw, nodes, edges, parent_id, parent_port)
|
|
|
1224
1246
|
style: {
|
|
1225
1247
|
stroke: colors.border,
|
|
1226
1248
|
lineWidth: 1,
|
|
1249
|
+
/*
|
|
1250
|
+
* Said on the EDGE and not left to the graph's element
|
|
1251
|
+
* default: a per-element `style` is what the reader of
|
|
1252
|
+
* this code sees, and an arrow that lives somewhere
|
|
1253
|
+
* else is an arrow nobody can find when it stops
|
|
1254
|
+
* being drawn.
|
|
1255
|
+
*
|
|
1256
|
+
* Filled with the line's own colour, because an
|
|
1257
|
+
* arrowhead in the default fill is a black triangle on
|
|
1258
|
+
* a teal line in light and an invisible one in dark.
|
|
1259
|
+
*/
|
|
1260
|
+
endArrow: true,
|
|
1261
|
+
endArrowSize: 8,
|
|
1262
|
+
endArrowFill: colors.border,
|
|
1263
|
+
endArrowStroke: colors.border,
|
|
1264
|
+
/* It lands on the card's `in` port, above the title. */
|
|
1265
|
+
targetPort: "in",
|
|
1227
1266
|
}
|
|
1228
1267
|
};
|
|
1229
1268
|
if(parent_port) {
|