ronds-metadata 1.2.85 → 1.2.86
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.
|
@@ -13,7 +13,7 @@ import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
|
13
13
|
/*
|
|
14
14
|
* @Author: wangxian
|
|
15
15
|
* @Date: 2022-05-24 14:31:01
|
|
16
|
-
* @LastEditTime: 2023-07-
|
|
16
|
+
* @LastEditTime: 2023-07-27 13:59:50
|
|
17
17
|
*/
|
|
18
18
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
19
19
|
import produce from 'immer';
|
|
@@ -59,6 +59,7 @@ export declare class GraphCore<N extends Node<Node.Properties> = Node<Node.Prope
|
|
|
59
59
|
getNodeById: (nodeId: string) => N | undefined;
|
|
60
60
|
updateNodeById: (nodeId: string, handler: (node?: N) => void) => void;
|
|
61
61
|
updateNodes: (handler: (nodes: N[]) => void) => void;
|
|
62
|
+
updateNodeNameById(id: string, name: string): void;
|
|
62
63
|
updateEdgeById: (edgeId: string, handler: (node?: E) => void) => void;
|
|
63
64
|
updateEdges: (handler: (edges: E[]) => void) => void;
|
|
64
65
|
throwRenderError: () => void;
|
|
@@ -6,7 +6,7 @@ var _excluded = ["wrapper", "container", "nodes", "edges"];
|
|
|
6
6
|
/*
|
|
7
7
|
* @Author: wangxian
|
|
8
8
|
* @Date: 2022-05-24 13:55:44
|
|
9
|
-
* @LastEditTime:
|
|
9
|
+
* @LastEditTime: 2023-07-27 14:04:35
|
|
10
10
|
*/
|
|
11
11
|
import { Graph } from '@antv/x6';
|
|
12
12
|
import { debounceTime, fromEventPattern, map, merge, scan, tap } from 'rxjs';
|
|
@@ -421,6 +421,17 @@ export var GraphCore = /*#__PURE__*/function () {
|
|
|
421
421
|
value: function onMoveNodes(args) {
|
|
422
422
|
if (process.env.NODE_ENV === 'development') {}
|
|
423
423
|
}
|
|
424
|
+
}, {
|
|
425
|
+
key: "updateNodeNameById",
|
|
426
|
+
value:
|
|
427
|
+
// 通过id更新名称
|
|
428
|
+
function updateNodeNameById(id, name) {
|
|
429
|
+
this.updateNodeById(id, function (node) {
|
|
430
|
+
node.setData({
|
|
431
|
+
name: name
|
|
432
|
+
});
|
|
433
|
+
});
|
|
434
|
+
}
|
|
424
435
|
}, {
|
|
425
436
|
key: "dispose",
|
|
426
437
|
value:
|