@receptron/graphai_vue_cytoscape 0.0.15 → 0.0.17
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/lib/cytoscape.js +7 -4
- package/package.json +2 -10
package/lib/cytoscape.js
CHANGED
|
@@ -238,7 +238,9 @@ var cytoscapeFromGraph = function (_graph_data) {
|
|
|
238
238
|
return tmp;
|
|
239
239
|
}, {});
|
|
240
240
|
Object.keys(node.inputs).forEach(function (parentInputNodeId) {
|
|
241
|
-
graph_1.nodes[parentInputNodeId]
|
|
241
|
+
if (!graph_1.nodes[parentInputNodeId]) {
|
|
242
|
+
graph_1.nodes[parentInputNodeId] = { value: "dummy" };
|
|
243
|
+
}
|
|
242
244
|
(0, exports.inputs2dataSources)([node.inputs[parentInputNodeId]]).forEach(function (input) {
|
|
243
245
|
var source = parseInput(input).source;
|
|
244
246
|
pushEdge({ source: nodeId, target: parentInputNodeId, label: source });
|
|
@@ -281,9 +283,10 @@ var useCytoscape = function (selectedGraph) {
|
|
|
281
283
|
_d.label = 2;
|
|
282
284
|
case 2:
|
|
283
285
|
elements = cytoscapeData.value.elements;
|
|
286
|
+
if (!elements.map[nodeId]) return [3 /*break*/, 4];
|
|
284
287
|
elements.map[nodeId].data.color = colorMap[state];
|
|
285
288
|
graph = selectedGraph.value;
|
|
286
|
-
nodeData = (_b = ((_a = graph === null || graph === void 0 ? void 0 : graph.nodes) !== null && _a !== void 0 ? _a : {})[nodeId]) !== null && _b !== void 0 ? _b :
|
|
289
|
+
nodeData = (_b = ((_a = graph === null || graph === void 0 ? void 0 : graph.nodes) !== null && _a !== void 0 ? _a : {})[nodeId]) !== null && _b !== void 0 ? _b : {};
|
|
287
290
|
if ("agent" in nodeData && state === graphai_1.NodeState.Queued && ((_c = nodeData.priority) !== null && _c !== void 0 ? _c : 0) > 0) {
|
|
288
291
|
// computed node
|
|
289
292
|
elements.map[nodeId].data.color = colorPriority;
|
|
@@ -342,7 +345,7 @@ var useCytoscape = function (selectedGraph) {
|
|
|
342
345
|
}
|
|
343
346
|
return prevName;
|
|
344
347
|
}, layout);
|
|
345
|
-
console.log("layout",
|
|
348
|
+
// console.log("layout", name);
|
|
346
349
|
cy.layout({ name: name_1 }).run();
|
|
347
350
|
cy.fit();
|
|
348
351
|
if (!(name_1 === layout)) return [3 /*break*/, 2];
|
|
@@ -356,7 +359,7 @@ var useCytoscape = function (selectedGraph) {
|
|
|
356
359
|
});
|
|
357
360
|
}); };
|
|
358
361
|
var storePositions = function () {
|
|
359
|
-
console.log("storePositions");
|
|
362
|
+
// console.log("storePositions");
|
|
360
363
|
if (cy) {
|
|
361
364
|
cy.nodes().forEach(function (cynode) {
|
|
362
365
|
var id = cynode.id();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@receptron/graphai_vue_cytoscape",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.17",
|
|
4
4
|
"main": "lib/cytoscape.js",
|
|
5
5
|
"files": [
|
|
6
6
|
"./lib"
|
|
@@ -30,19 +30,11 @@
|
|
|
30
30
|
"cytoscape-klay": "^3.1.4"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@babel/types": "^7.26.3",
|
|
34
|
-
"@rushstack/eslint-patch": "^1.8.0",
|
|
35
|
-
"@tsconfig/node20": "^20.1.4",
|
|
36
33
|
"@types/cytoscape-klay": "^3.1.4",
|
|
37
34
|
"@vitejs/plugin-vue": "^5.2.1",
|
|
38
35
|
"@vue/tsconfig": "^0.7.0",
|
|
39
|
-
"autoprefixer": "^10.4.19",
|
|
40
|
-
"npm-run-all2": "^7.0.1",
|
|
41
|
-
"postcss": "^8.4.49",
|
|
42
|
-
"tailwindcss": "^3.4.16",
|
|
43
|
-
"vite": "^6.0.3",
|
|
44
36
|
"vue": "^3.5.13",
|
|
45
|
-
"vue-tsc": "^2.
|
|
37
|
+
"vue-tsc": "^2.2.0"
|
|
46
38
|
},
|
|
47
39
|
"types": "./lib/cytoscape.d.ts",
|
|
48
40
|
"directories": {
|