code-kg 0.1.12 → 0.1.13
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/server/ui.js +29 -22
- package/dist/server/ui.js.map +1 -1
- package/package.json +1 -1
package/dist/server/ui.js
CHANGED
|
@@ -1007,9 +1007,9 @@ function renderUiHtml() {
|
|
|
1007
1007
|
node.x = x;
|
|
1008
1008
|
node.y = y;
|
|
1009
1009
|
node.z = z;
|
|
1010
|
-
node.fx =
|
|
1011
|
-
node.fy =
|
|
1012
|
-
node.fz =
|
|
1010
|
+
node.fx = undefined;
|
|
1011
|
+
node.fy = undefined;
|
|
1012
|
+
node.fz = undefined;
|
|
1013
1013
|
node.__renderVisible = true;
|
|
1014
1014
|
nodeById.set(node.id, node);
|
|
1015
1015
|
}
|
|
@@ -1222,16 +1222,32 @@ function renderUiHtml() {
|
|
|
1222
1222
|
|
|
1223
1223
|
const usingWasmLayout = isWasmLayoutEngine(state.layoutEngine);
|
|
1224
1224
|
if (typeof graph.cooldownTicks === 'function') {
|
|
1225
|
-
graph.cooldownTicks(
|
|
1225
|
+
graph.cooldownTicks(
|
|
1226
|
+
usingWasmLayout
|
|
1227
|
+
? (mode === 'normal' ? 96 : mode === 'degraded' ? 42 : 20)
|
|
1228
|
+
: (mode === 'normal' ? 220 : mode === 'degraded' ? 72 : 28)
|
|
1229
|
+
);
|
|
1226
1230
|
}
|
|
1227
1231
|
if (typeof graph.cooldownTime === 'function') {
|
|
1228
|
-
graph.cooldownTime(
|
|
1232
|
+
graph.cooldownTime(
|
|
1233
|
+
usingWasmLayout
|
|
1234
|
+
? (mode === 'normal' ? 3200 : mode === 'degraded' ? 1700 : 900)
|
|
1235
|
+
: (mode === 'normal' ? 9000 : mode === 'degraded' ? 2200 : 900)
|
|
1236
|
+
);
|
|
1229
1237
|
}
|
|
1230
1238
|
if (typeof graph.warmupTicks === 'function') {
|
|
1231
|
-
graph.warmupTicks(
|
|
1239
|
+
graph.warmupTicks(
|
|
1240
|
+
usingWasmLayout
|
|
1241
|
+
? (mode === 'normal' ? 14 : mode === 'degraded' ? 7 : 4)
|
|
1242
|
+
: (mode === 'normal' ? 60 : mode === 'degraded' ? 12 : 4)
|
|
1243
|
+
);
|
|
1232
1244
|
}
|
|
1233
1245
|
if (typeof graph.d3VelocityDecay === 'function') {
|
|
1234
|
-
graph.d3VelocityDecay(
|
|
1246
|
+
graph.d3VelocityDecay(
|
|
1247
|
+
usingWasmLayout
|
|
1248
|
+
? (mode === 'normal' ? 0.36 : mode === 'degraded' ? 0.46 : 0.58)
|
|
1249
|
+
: (mode === 'normal' ? 0.28 : mode === 'degraded' ? 0.4 : 0.58)
|
|
1250
|
+
);
|
|
1235
1251
|
}
|
|
1236
1252
|
if (typeof graph.nodeResolution === 'function') {
|
|
1237
1253
|
graph.nodeResolution(mode === 'normal' ? 6 : mode === 'degraded' ? 4 : 3);
|
|
@@ -1264,20 +1280,11 @@ function renderUiHtml() {
|
|
|
1264
1280
|
if (typeof graph.d3Force === 'function') {
|
|
1265
1281
|
const currentCharge = graph.d3Force('charge');
|
|
1266
1282
|
const currentLink = graph.d3Force('link');
|
|
1267
|
-
if (
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
graph.d3Force('link', state.defaultLinkForce);
|
|
1273
|
-
}
|
|
1274
|
-
} else {
|
|
1275
|
-
if (currentCharge != null) {
|
|
1276
|
-
graph.d3Force('charge', null);
|
|
1277
|
-
}
|
|
1278
|
-
if (currentLink != null) {
|
|
1279
|
-
graph.d3Force('link', null);
|
|
1280
|
-
}
|
|
1283
|
+
if (state.defaultChargeForce && currentCharge == null) {
|
|
1284
|
+
graph.d3Force('charge', state.defaultChargeForce);
|
|
1285
|
+
}
|
|
1286
|
+
if (state.defaultLinkForce && currentLink == null) {
|
|
1287
|
+
graph.d3Force('link', state.defaultLinkForce);
|
|
1281
1288
|
}
|
|
1282
1289
|
}
|
|
1283
1290
|
|
|
@@ -1406,7 +1413,7 @@ function renderUiHtml() {
|
|
|
1406
1413
|
})(els.graphCanvas)
|
|
1407
1414
|
.backgroundColor('#01040f')
|
|
1408
1415
|
.showNavInfo(false)
|
|
1409
|
-
.nodeOpacity(0.
|
|
1416
|
+
.nodeOpacity(0.82)
|
|
1410
1417
|
.nodeVisibility((node) => node.__renderVisible !== false)
|
|
1411
1418
|
.nodeLabel((node) => {
|
|
1412
1419
|
const name = String(node.name || node.id || 'node');
|
package/dist/server/ui.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui.js","sourceRoot":"","sources":["../../src/server/ui.ts"],"names":[],"mappings":";;AAEA,
|
|
1
|
+
{"version":3,"file":"ui.js","sourceRoot":"","sources":["../../src/server/ui.ts"],"names":[],"mappings":";;AAEA,oCA8+DC;AAh/DD,2DAAmE;AAEnE,SAAgB,YAAY;IAC1B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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