@krainovsd/graph 0.9.0 → 0.10.0-rc1
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/cjs/index.cjs +2633 -1795
- package/lib/cjs/index.cjs.map +1 -1
- package/lib/esm/index.js +12 -3
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/lib/draw-time.js +5 -1
- package/lib/esm/lib/draw-time.js.map +1 -1
- package/lib/esm/lib/get-controls-info.js +451 -224
- package/lib/esm/lib/get-controls-info.js.map +1 -1
- package/lib/esm/module/GraphCanvas/GraphCanvas.js +39 -927
- package/lib/esm/module/GraphCanvas/GraphCanvas.js.map +1 -1
- package/lib/esm/module/GraphCanvas/constants/settings.js +70 -47
- package/lib/esm/module/GraphCanvas/constants/settings.js.map +1 -1
- package/lib/esm/module/GraphCanvas/lib/settings/node-settings-getter.js +10 -1
- package/lib/esm/module/GraphCanvas/lib/settings/node-settings-getter.js.map +1 -1
- package/lib/esm/module/GraphCanvas/lib/utils/calculate-link-position-by-node.js +270 -0
- package/lib/esm/module/GraphCanvas/lib/utils/calculate-link-position-by-node.js.map +1 -0
- package/lib/esm/module/GraphCanvas/lib/utils/drag-place-coefficient-getter.js +2 -2
- package/lib/esm/module/GraphCanvas/lib/utils/drag-place-coefficient-getter.js.map +1 -1
- package/lib/esm/module/GraphCanvas/lib/utils/get-particle-position.js +19 -4
- package/lib/esm/module/GraphCanvas/lib/utils/get-particle-position.js.map +1 -1
- package/lib/esm/module/GraphCanvas/lib/utils/is-node-visible.js +29 -4
- package/lib/esm/module/GraphCanvas/lib/utils/is-node-visible.js.map +1 -1
- package/lib/esm/module/GraphCanvas/lib/utils/is-overlaps-node.js +53 -4
- package/lib/esm/module/GraphCanvas/lib/utils/is-overlaps-node.js.map +1 -1
- package/lib/esm/module/GraphCanvas/lib/utils/link-by-pointer-getter.js +2 -2
- package/lib/esm/module/GraphCanvas/lib/utils/link-by-pointer-getter.js.map +1 -1
- package/lib/esm/module/GraphCanvas/lib/utils/node-by-pointer-getter.js +3 -13
- package/lib/esm/module/GraphCanvas/lib/utils/node-by-pointer-getter.js.map +1 -1
- package/lib/esm/module/GraphCanvas/slices/draw-links.js +207 -0
- package/lib/esm/module/GraphCanvas/slices/draw-links.js.map +1 -0
- package/lib/esm/module/GraphCanvas/slices/draw-nodes.js +342 -0
- package/lib/esm/module/GraphCanvas/slices/draw-nodes.js.map +1 -0
- package/lib/esm/module/GraphCanvas/{lib/utils → slices}/draw-text.js +23 -6
- package/lib/esm/module/GraphCanvas/slices/draw-text.js.map +1 -0
- package/lib/esm/module/GraphCanvas/slices/init-area.js +31 -0
- package/lib/esm/module/GraphCanvas/slices/init-area.js.map +1 -0
- package/lib/esm/module/GraphCanvas/slices/init-dnd.js +62 -0
- package/lib/esm/module/GraphCanvas/slices/init-dnd.js.map +1 -0
- package/lib/esm/module/GraphCanvas/slices/init-draw.js +84 -0
- package/lib/esm/module/GraphCanvas/slices/init-draw.js.map +1 -0
- package/lib/esm/module/GraphCanvas/slices/init-pointer.js +211 -0
- package/lib/esm/module/GraphCanvas/slices/init-pointer.js.map +1 -0
- package/lib/esm/module/GraphCanvas/slices/init-resize.js +28 -0
- package/lib/esm/module/GraphCanvas/slices/init-resize.js.map +1 -0
- package/lib/esm/module/GraphCanvas/slices/init-simulation.js +172 -0
- package/lib/esm/module/GraphCanvas/slices/init-simulation.js.map +1 -0
- package/lib/esm/module/GraphCanvas/slices/init-zoom.js +36 -0
- package/lib/esm/module/GraphCanvas/slices/init-zoom.js.map +1 -0
- package/lib/index.d.ts +169 -132
- package/package.json +1 -1
- package/lib/esm/module/GraphCanvas/lib/utils/calculate-link-position-by-radius.js +0 -20
- package/lib/esm/module/GraphCanvas/lib/utils/calculate-link-position-by-radius.js.map +0 -1
- package/lib/esm/module/GraphCanvas/lib/utils/draw-text.js.map +0 -1
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { forceCollide, forceX, forceY, forceManyBody, forceCenter, forceSimulation, forceLink } from 'd3-force';
|
|
2
|
+
import '@krainovsd/js-helpers';
|
|
3
|
+
import { nodeOptionsGetter, nodeRadiusGetter, nodeSizeGetter } from '../lib/settings/node-settings-getter.js';
|
|
4
|
+
import 'd3-array';
|
|
5
|
+
import { nodeIterationExtractor } from '../lib/utils/node-iteration-extractor.js';
|
|
6
|
+
import { getDrawTime, resetDrawTime } from '../../../lib/draw-time.js';
|
|
7
|
+
import { getTextLines } from './draw-text.js';
|
|
8
|
+
|
|
9
|
+
function initSimulation() {
|
|
10
|
+
if (!this.simulation) {
|
|
11
|
+
this.simulation = forceSimulation()
|
|
12
|
+
.nodes(this.nodes)
|
|
13
|
+
.force("link", forceLink(this.links).id(this.nodeSettings.idGetter))
|
|
14
|
+
.on("tick", () => {
|
|
15
|
+
this.draw();
|
|
16
|
+
})
|
|
17
|
+
.on("end", () => {
|
|
18
|
+
this.listeners.onSimulationEnd?.(this.state);
|
|
19
|
+
if (this.graphSettings.showDrawTime) {
|
|
20
|
+
getDrawTime();
|
|
21
|
+
// eslint-disable-next-line no-console
|
|
22
|
+
console.log(`nodes: ${this.nodes.length} | links: ${this.links.length}`);
|
|
23
|
+
resetDrawTime();
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
initSimulationForces.call(this);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
function initSimulationForces() {
|
|
30
|
+
if (!this.simulation)
|
|
31
|
+
return;
|
|
32
|
+
const linkForce = this.simulation.force("link");
|
|
33
|
+
if (!linkForce)
|
|
34
|
+
return;
|
|
35
|
+
if ((!this.forceSettings.forces || !this.forceSettings.xForce) && this.simulation.force("x")) {
|
|
36
|
+
this.simulation.force("x", null);
|
|
37
|
+
}
|
|
38
|
+
if ((!this.forceSettings.forces || !this.forceSettings.yForce) && this.simulation.force("y")) {
|
|
39
|
+
this.simulation.force("y", null);
|
|
40
|
+
}
|
|
41
|
+
if ((!this.forceSettings.forces || !this.forceSettings.chargeForce) &&
|
|
42
|
+
this.simulation.force("charge")) {
|
|
43
|
+
this.simulation.force("charge", null);
|
|
44
|
+
}
|
|
45
|
+
if ((!this.forceSettings.forces || !this.forceSettings.centerForce) &&
|
|
46
|
+
this.simulation.force("center")) {
|
|
47
|
+
this.simulation.force("center", null);
|
|
48
|
+
}
|
|
49
|
+
if (!this.forceSettings.forces || !this.forceSettings.linkForce) {
|
|
50
|
+
linkForce.distance(0).strength(0).iterations(0);
|
|
51
|
+
}
|
|
52
|
+
if (this.forceSettings.forces && this.forceSettings.linkForce) {
|
|
53
|
+
linkForce
|
|
54
|
+
.distance(this.forceSettings.linkDistance)
|
|
55
|
+
.strength(this.forceSettings.linkStrength)
|
|
56
|
+
.iterations(this.forceSettings.linkIterations);
|
|
57
|
+
}
|
|
58
|
+
if (this.forceSettings.forces && this.forceSettings.xForce) {
|
|
59
|
+
this.simulation.force("x", forceX(this.forceSettings.xPosition).strength(this.forceSettings.xStrength));
|
|
60
|
+
}
|
|
61
|
+
if (this.forceSettings.forces && this.forceSettings.yForce) {
|
|
62
|
+
this.simulation.force("y", forceY(this.forceSettings.yPosition).strength(this.forceSettings.yStrength));
|
|
63
|
+
}
|
|
64
|
+
if (this.forceSettings.forces && this.forceSettings.chargeForce) {
|
|
65
|
+
this.simulation.force("charge", forceManyBody()
|
|
66
|
+
.strength(this.forceSettings.chargeStrength)
|
|
67
|
+
.distanceMax(this.forceSettings.chargeDistanceMax)
|
|
68
|
+
.distanceMin(this.forceSettings.chargeDistanceMin));
|
|
69
|
+
}
|
|
70
|
+
if (this.forceSettings.forces && this.forceSettings.centerForce) {
|
|
71
|
+
this.simulation.force("center", forceCenter(this.forceSettings.centerPosition.x ?? 0, this.forceSettings.centerPosition.y ?? 0).strength(this.forceSettings.centerStrength));
|
|
72
|
+
}
|
|
73
|
+
initCollideForce.call(this, true);
|
|
74
|
+
}
|
|
75
|
+
function initCollideForce(forceUpdate) {
|
|
76
|
+
if (!this.simulation)
|
|
77
|
+
return;
|
|
78
|
+
if ((!this.forceSettings.collideForce || !this.forceSettings.forces) &&
|
|
79
|
+
this.simulation.force("collide")) {
|
|
80
|
+
this.simulation.force("collide", null);
|
|
81
|
+
}
|
|
82
|
+
if (this.forceSettings.forces && this.forceSettings.collideForce) {
|
|
83
|
+
const isHasMax = this.forceSettings.collideOffMax.links != 0 && this.forceSettings.collideOffMax.nodes != 0;
|
|
84
|
+
const isMaxCollideNodes = isHasMax && this.forceSettings.collideOffMax.nodes < this.nodes.length;
|
|
85
|
+
const isMaxCollideLinks = isHasMax && this.forceSettings.collideOffMax.links < this.links.length;
|
|
86
|
+
if (isMaxCollideNodes && isMaxCollideLinks) {
|
|
87
|
+
this.simulation.force("collide", null);
|
|
88
|
+
}
|
|
89
|
+
else if (!this.simulation.force("collide") || forceUpdate) {
|
|
90
|
+
this.simulation.force("collide", forceCollide()
|
|
91
|
+
.radius((node, index) => {
|
|
92
|
+
const nodeOptions = nodeIterationExtractor(node, index, this.nodes, this.state, this.nodeSettings.options ?? {}, nodeOptionsGetter);
|
|
93
|
+
switch (nodeOptions.shape) {
|
|
94
|
+
case "circle": {
|
|
95
|
+
if (this.forceSettings.collideRadius) {
|
|
96
|
+
return nodeIterationExtractor(node, index, this.nodes, this.state, this.forceSettings.collideRadius, undefined);
|
|
97
|
+
}
|
|
98
|
+
const radius = nodeRadiusGetter({
|
|
99
|
+
radiusFlexible: this.nodeSettings.nodeRadiusFlexible,
|
|
100
|
+
radiusInitial: nodeOptions.radius,
|
|
101
|
+
radiusCoefficient: this.nodeSettings.nodeRadiusCoefficient,
|
|
102
|
+
radiusFactor: this.nodeSettings.nodeRadiusFactor,
|
|
103
|
+
linkCount: node.linkCount,
|
|
104
|
+
});
|
|
105
|
+
return radius + this.forceSettings.collideAdditionalRadius;
|
|
106
|
+
}
|
|
107
|
+
case "square": {
|
|
108
|
+
const { height, width } = nodeSizeGetter({
|
|
109
|
+
heightInitial: nodeOptions.width,
|
|
110
|
+
widthInitial: nodeOptions.height,
|
|
111
|
+
linkCount: node.linkCount,
|
|
112
|
+
sizeCoefficient: this.nodeSettings.nodeSizeCoefficient,
|
|
113
|
+
sizeFactor: this.nodeSettings.nodeSizeFactor,
|
|
114
|
+
sizeFlexible: this.nodeSettings.nodeSizeFlexible,
|
|
115
|
+
});
|
|
116
|
+
return (Math.sqrt(width ** 2 + height ** 2) / 2 +
|
|
117
|
+
this.forceSettings.collideAdditionalRadius);
|
|
118
|
+
}
|
|
119
|
+
case "text": {
|
|
120
|
+
let { height, width } = nodeSizeGetter({
|
|
121
|
+
heightInitial: nodeOptions.width,
|
|
122
|
+
widthInitial: nodeOptions.height,
|
|
123
|
+
linkCount: node.linkCount,
|
|
124
|
+
sizeCoefficient: this.nodeSettings.nodeSizeCoefficient,
|
|
125
|
+
sizeFactor: this.nodeSettings.nodeSizeFactor,
|
|
126
|
+
sizeFlexible: this.nodeSettings.nodeSizeFlexible,
|
|
127
|
+
});
|
|
128
|
+
if (this.context && nodeOptions.text) {
|
|
129
|
+
const lines = this.cachedNodeText[node.id] ??
|
|
130
|
+
getTextLines({
|
|
131
|
+
context: this.context,
|
|
132
|
+
text: nodeOptions.text,
|
|
133
|
+
textAlign: nodeOptions.textAlign,
|
|
134
|
+
textColor: nodeOptions.textColor,
|
|
135
|
+
textFont: nodeOptions.textFont,
|
|
136
|
+
textSize: nodeOptions.textSize,
|
|
137
|
+
maxWidth: width,
|
|
138
|
+
textStyle: nodeOptions.textStyle,
|
|
139
|
+
textWeight: nodeOptions.textWeight,
|
|
140
|
+
});
|
|
141
|
+
height =
|
|
142
|
+
lines.length * nodeOptions.textSize +
|
|
143
|
+
(lines.length - 1) * nodeOptions.textGap +
|
|
144
|
+
nodeOptions.textNodeYPadding;
|
|
145
|
+
width += nodeOptions.textNodeXPadding;
|
|
146
|
+
}
|
|
147
|
+
return (Math.sqrt(width ** 2 + height ** 2) / 2 +
|
|
148
|
+
this.forceSettings.collideAdditionalRadius);
|
|
149
|
+
}
|
|
150
|
+
default: {
|
|
151
|
+
if (this.forceSettings.collideRadius) {
|
|
152
|
+
return nodeIterationExtractor(node, index, this.nodes, this.state, this.forceSettings.collideRadius, undefined);
|
|
153
|
+
}
|
|
154
|
+
const radius = nodeRadiusGetter({
|
|
155
|
+
radiusFlexible: this.nodeSettings.nodeRadiusFlexible,
|
|
156
|
+
radiusInitial: nodeOptions.radius,
|
|
157
|
+
radiusCoefficient: this.nodeSettings.nodeRadiusCoefficient,
|
|
158
|
+
radiusFactor: this.nodeSettings.nodeRadiusFactor,
|
|
159
|
+
linkCount: node.linkCount,
|
|
160
|
+
});
|
|
161
|
+
return radius + this.forceSettings.collideAdditionalRadius;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
})
|
|
165
|
+
.strength(this.forceSettings.collideStrength)
|
|
166
|
+
.iterations(this.forceSettings.collideIterations));
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export { initCollideForce, initSimulation, initSimulationForces };
|
|
172
|
+
//# sourceMappingURL=init-simulation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init-simulation.js","sources":["../../../../../src/module/GraphCanvas/slices/init-simulation.ts"],"sourcesContent":["import {\n type ForceLink,\n forceCenter,\n forceCollide,\n forceLink,\n forceManyBody,\n forceSimulation,\n forceX,\n forceY,\n} from \"d3-force\";\nimport { getDrawTime, resetDrawTime } from \"@/lib\";\nimport type { LinkInterface, NodeInterface } from \"@/types\";\nimport type { GraphCanvas } from \"../GraphCanvas\";\nimport {\n nodeIterationExtractor,\n nodeOptionsGetter,\n nodeRadiusGetter,\n nodeSizeGetter,\n} from \"../lib\";\nimport { getTextLines } from \"./draw-text\";\n\nexport function initSimulation<\n NodeData extends Record<string, unknown>,\n LinkData extends Record<string, unknown>,\n>(this: GraphCanvas<NodeData, LinkData>) {\n if (!this.simulation) {\n this.simulation = forceSimulation<NodeInterface<NodeData>, LinkInterface<NodeData, LinkData>>()\n .nodes(this.nodes)\n .force(\n \"link\",\n forceLink<NodeInterface<NodeData>, LinkInterface<NodeData, LinkData>>(this.links).id(\n this.nodeSettings.idGetter,\n ),\n )\n .on(\"tick\", () => {\n this.draw();\n })\n .on(\"end\", () => {\n this.listeners.onSimulationEnd?.(this.state);\n\n if (this.graphSettings.showDrawTime) {\n getDrawTime();\n // eslint-disable-next-line no-console\n console.log(`nodes: ${this.nodes.length} | links: ${this.links.length}`);\n resetDrawTime();\n }\n });\n\n initSimulationForces.call<\n GraphCanvas<NodeData, LinkData>,\n Parameters<typeof initSimulationForces>,\n ReturnType<typeof initSimulationForces>\n >(this);\n }\n}\n\nexport function initSimulationForces<\n NodeData extends Record<string, unknown>,\n LinkData extends Record<string, unknown>,\n>(this: GraphCanvas<NodeData, LinkData>) {\n if (!this.simulation) return;\n\n const linkForce = this.simulation.force(\"link\") as\n | ForceLink<NodeInterface<NodeData>, LinkInterface<NodeData, LinkData>>\n | undefined;\n\n if (!linkForce) return;\n\n if ((!this.forceSettings.forces || !this.forceSettings.xForce) && this.simulation.force(\"x\")) {\n this.simulation.force(\"x\", null);\n }\n if ((!this.forceSettings.forces || !this.forceSettings.yForce) && this.simulation.force(\"y\")) {\n this.simulation.force(\"y\", null);\n }\n if (\n (!this.forceSettings.forces || !this.forceSettings.chargeForce) &&\n this.simulation.force(\"charge\")\n ) {\n this.simulation.force(\"charge\", null);\n }\n if (\n (!this.forceSettings.forces || !this.forceSettings.centerForce) &&\n this.simulation.force(\"center\")\n ) {\n this.simulation.force(\"center\", null);\n }\n if (!this.forceSettings.forces || !this.forceSettings.linkForce) {\n linkForce.distance(0).strength(0).iterations(0);\n }\n\n if (this.forceSettings.forces && this.forceSettings.linkForce) {\n linkForce\n .distance(this.forceSettings.linkDistance)\n .strength(this.forceSettings.linkStrength)\n .iterations(this.forceSettings.linkIterations);\n }\n if (this.forceSettings.forces && this.forceSettings.xForce) {\n this.simulation.force(\n \"x\",\n forceX<NodeInterface<NodeData>>(this.forceSettings.xPosition).strength(\n this.forceSettings.xStrength,\n ),\n );\n }\n if (this.forceSettings.forces && this.forceSettings.yForce) {\n this.simulation.force(\n \"y\",\n forceY<NodeInterface<NodeData>>(this.forceSettings.yPosition).strength(\n this.forceSettings.yStrength,\n ),\n );\n }\n if (this.forceSettings.forces && this.forceSettings.chargeForce) {\n this.simulation.force(\n \"charge\",\n forceManyBody<NodeInterface<NodeData>>()\n .strength(this.forceSettings.chargeStrength)\n .distanceMax(this.forceSettings.chargeDistanceMax)\n .distanceMin(this.forceSettings.chargeDistanceMin),\n );\n }\n if (this.forceSettings.forces && this.forceSettings.centerForce) {\n this.simulation.force(\n \"center\",\n forceCenter<NodeInterface<NodeData>>(\n this.forceSettings.centerPosition.x ?? 0,\n this.forceSettings.centerPosition.y ?? 0,\n ).strength(this.forceSettings.centerStrength),\n );\n }\n\n initCollideForce.call<\n GraphCanvas<NodeData, LinkData>,\n Parameters<typeof initCollideForce>,\n ReturnType<typeof initCollideForce>\n >(this, true);\n}\n\nexport function initCollideForce<\n NodeData extends Record<string, unknown>,\n LinkData extends Record<string, unknown>,\n>(this: GraphCanvas<NodeData, LinkData>, forceUpdate: boolean) {\n if (!this.simulation) return;\n\n if (\n (!this.forceSettings.collideForce || !this.forceSettings.forces) &&\n this.simulation.force(\"collide\")\n ) {\n this.simulation.force(\"collide\", null);\n }\n\n if (this.forceSettings.forces && this.forceSettings.collideForce) {\n const isHasMax =\n this.forceSettings.collideOffMax.links != 0 && this.forceSettings.collideOffMax.nodes != 0;\n const isMaxCollideNodes =\n isHasMax && this.forceSettings.collideOffMax.nodes < this.nodes.length;\n const isMaxCollideLinks =\n isHasMax && this.forceSettings.collideOffMax.links < this.links.length;\n if (isMaxCollideNodes && isMaxCollideLinks) {\n this.simulation.force(\"collide\", null);\n } else if (!this.simulation.force(\"collide\") || forceUpdate) {\n this.simulation.force(\n \"collide\",\n forceCollide<NodeInterface<NodeData>>()\n .radius((node, index) => {\n const nodeOptions = nodeIterationExtractor(\n node,\n index,\n this.nodes,\n this.state,\n this.nodeSettings.options ?? {},\n nodeOptionsGetter,\n );\n\n switch (nodeOptions.shape) {\n case \"circle\": {\n if (this.forceSettings.collideRadius) {\n return nodeIterationExtractor(\n node,\n index,\n this.nodes,\n this.state,\n this.forceSettings.collideRadius,\n undefined,\n );\n }\n const radius = nodeRadiusGetter({\n radiusFlexible: this.nodeSettings.nodeRadiusFlexible,\n radiusInitial: nodeOptions.radius,\n radiusCoefficient: this.nodeSettings.nodeRadiusCoefficient,\n radiusFactor: this.nodeSettings.nodeRadiusFactor,\n linkCount: node.linkCount,\n });\n\n return radius + this.forceSettings.collideAdditionalRadius;\n }\n case \"square\": {\n const { height, width } = nodeSizeGetter({\n heightInitial: nodeOptions.width,\n widthInitial: nodeOptions.height,\n linkCount: node.linkCount,\n sizeCoefficient: this.nodeSettings.nodeSizeCoefficient,\n sizeFactor: this.nodeSettings.nodeSizeFactor,\n sizeFlexible: this.nodeSettings.nodeSizeFlexible,\n });\n\n return (\n Math.sqrt(width ** 2 + height ** 2) / 2 +\n this.forceSettings.collideAdditionalRadius\n );\n }\n case \"text\": {\n let { height, width } = nodeSizeGetter({\n heightInitial: nodeOptions.width,\n widthInitial: nodeOptions.height,\n linkCount: node.linkCount,\n sizeCoefficient: this.nodeSettings.nodeSizeCoefficient,\n sizeFactor: this.nodeSettings.nodeSizeFactor,\n sizeFlexible: this.nodeSettings.nodeSizeFlexible,\n });\n\n if (this.context && nodeOptions.text) {\n const lines =\n this.cachedNodeText[node.id] ??\n getTextLines({\n context: this.context,\n text: nodeOptions.text,\n textAlign: nodeOptions.textAlign,\n textColor: nodeOptions.textColor,\n textFont: nodeOptions.textFont,\n textSize: nodeOptions.textSize,\n maxWidth: width,\n textStyle: nodeOptions.textStyle,\n textWeight: nodeOptions.textWeight,\n });\n\n height =\n lines.length * nodeOptions.textSize +\n (lines.length - 1) * nodeOptions.textGap +\n nodeOptions.textNodeYPadding;\n width += nodeOptions.textNodeXPadding;\n }\n\n return (\n Math.sqrt(width ** 2 + height ** 2) / 2 +\n this.forceSettings.collideAdditionalRadius\n );\n }\n default: {\n if (this.forceSettings.collideRadius) {\n return nodeIterationExtractor(\n node,\n index,\n this.nodes,\n this.state,\n this.forceSettings.collideRadius,\n undefined,\n );\n }\n const radius = nodeRadiusGetter({\n radiusFlexible: this.nodeSettings.nodeRadiusFlexible,\n radiusInitial: nodeOptions.radius,\n radiusCoefficient: this.nodeSettings.nodeRadiusCoefficient,\n radiusFactor: this.nodeSettings.nodeRadiusFactor,\n linkCount: node.linkCount,\n });\n\n return radius + this.forceSettings.collideAdditionalRadius;\n }\n }\n })\n .strength(this.forceSettings.collideStrength)\n .iterations(this.forceSettings.collideIterations),\n );\n }\n }\n}\n"],"names":[],"mappings":";;;;;;;;SAqBgB,cAAc,GAAA;AAI5B,IAAA,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;AACpB,QAAA,IAAI,CAAC,UAAU,GAAG,eAAe;AAC9B,aAAA,KAAK,CAAC,IAAI,CAAC,KAAK;AAChB,aAAA,KAAK,CACJ,MAAM,EACN,SAAS,CAA6D,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAClF,IAAI,CAAC,YAAY,CAAC,QAAQ,CAC3B;AAEF,aAAA,EAAE,CAAC,MAAM,EAAE,MAAK;YACf,IAAI,CAAC,IAAI,EAAE;AACb,SAAC;AACA,aAAA,EAAE,CAAC,KAAK,EAAE,MAAK;YACd,IAAI,CAAC,SAAS,CAAC,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC;AAE5C,YAAA,IAAI,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE;AACnC,gBAAA,WAAW,EAAE;;AAEb,gBAAA,OAAO,CAAC,GAAG,CAAC,CAAU,OAAA,EAAA,IAAI,CAAC,KAAK,CAAC,MAAM,CAAA,UAAA,EAAa,IAAI,CAAC,KAAK,CAAC,MAAM,CAAA,CAAE,CAAC;AACxE,gBAAA,aAAa,EAAE;;AAEnB,SAAC,CAAC;AAEJ,QAAA,oBAAoB,CAAC,IA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{ isArray } from '@krainovsd/js-helpers';
|
|
2
|
+
import { select } from 'd3-selection';
|
|
3
|
+
import { zoom, ZoomTransform } from 'd3-zoom';
|
|
4
|
+
|
|
5
|
+
function initZoom(currentZoom) {
|
|
6
|
+
if (!this.area)
|
|
7
|
+
throw new Error("bad init data");
|
|
8
|
+
const zoomInstance = zoom()
|
|
9
|
+
.scaleExtent(this.graphSettings.zoomExtent)
|
|
10
|
+
.on("zoom", (event) => {
|
|
11
|
+
this.listeners.onZoom?.(event);
|
|
12
|
+
this.areaTransform = event.transform;
|
|
13
|
+
this.linkOptionsCache = {};
|
|
14
|
+
this.nodeOptionsCache = {};
|
|
15
|
+
if (!this.simulationWorking && !this.highlightWorking)
|
|
16
|
+
requestAnimationFrame(() => this.draw());
|
|
17
|
+
});
|
|
18
|
+
if (this.graphSettings.translateExtentEnable) {
|
|
19
|
+
const coefficient = this.graphSettings.translateExtentCoefficient;
|
|
20
|
+
const [coefficientX, coefficientY] = isArray(coefficient)
|
|
21
|
+
? coefficient
|
|
22
|
+
: [coefficient, coefficient];
|
|
23
|
+
const [[minX = -this.width * coefficientX, minY = -this.height * coefficientY], [maxX = this.width * coefficientX, maxY = this.height * coefficientY],] = this.graphSettings.translateExtent;
|
|
24
|
+
zoomInstance.translateExtent([
|
|
25
|
+
[minX, minY],
|
|
26
|
+
[maxX, maxY],
|
|
27
|
+
]);
|
|
28
|
+
}
|
|
29
|
+
select(this.area).call(zoomInstance).on("dblclick.zoom", null);
|
|
30
|
+
const zoomInitial = currentZoom ?? this.graphSettings.zoomInitial;
|
|
31
|
+
this.areaTransform = new ZoomTransform(zoomInitial?.k ?? 1, zoomInitial?.x ?? this.width / 2, zoomInitial?.y ?? this.height / 2);
|
|
32
|
+
zoom().transform(select(this.area), this.areaTransform);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export { initZoom };
|
|
36
|
+
//# sourceMappingURL=init-zoom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init-zoom.js","sources":["../../../../../src/module/GraphCanvas/slices/init-zoom.ts"],"sourcesContent":["import { isArray } from \"@krainovsd/js-helpers\";\nimport { select as d3Select } from \"d3-selection\";\nimport { ZoomTransform, zoom } from \"d3-zoom\";\nimport type { GraphCanvas } from \"../GraphCanvas\";\nimport type { ZoomEventInterface } from \"../types\";\n\nexport function initZoom<\n NodeData extends Record<string, unknown>,\n LinkData extends Record<string, unknown>,\n>(this: GraphCanvas<NodeData, LinkData>, currentZoom?: ZoomTransform) {\n if (!this.area) throw new Error(\"bad init data\");\n\n const zoomInstance = zoom<HTMLCanvasElement, unknown>()\n .scaleExtent(this.graphSettings.zoomExtent)\n .on(\"zoom\", (event: ZoomEventInterface) => {\n this.listeners.onZoom?.(event);\n this.areaTransform = event.transform;\n this.linkOptionsCache = {};\n this.nodeOptionsCache = {};\n\n if (!this.simulationWorking && !this.highlightWorking)\n requestAnimationFrame(() => this.draw());\n });\n\n if (this.graphSettings.translateExtentEnable) {\n const coefficient = this.graphSettings.translateExtentCoefficient;\n const [coefficientX, coefficientY] = isArray(coefficient)\n ? coefficient\n : [coefficient, coefficient];\n\n const [\n [minX = -this.width * coefficientX, minY = -this.height * coefficientY],\n [maxX = this.width * coefficientX, maxY = this.height * coefficientY],\n ] = this.graphSettings.translateExtent;\n\n zoomInstance.translateExtent([\n [minX, minY],\n [maxX, maxY],\n ]);\n }\n\n d3Select(this.area).call(zoomInstance).on(\"dblclick.zoom\", null);\n\n const zoomInitial = currentZoom ?? this.graphSettings.zoomInitial;\n this.areaTransform = new ZoomTransform(\n zoomInitial?.k ?? 1,\n zoomInitial?.x ?? this.width / 2,\n zoomInitial?.y ?? this.height / 2,\n );\n zoom<HTMLCanvasElement, unknown>().transform(d3Select(this.area), this.areaTransform);\n}\n"],"names":["d3Select"],"mappings":";;;;AAMM,SAAU,QAAQ,CAGiB,WAA2B,EAAA;IAClE,IAAI,CAAC,IAAI,CAAC,IAAI;AAAE,QAAA,MAAM,IAAI,KAAK,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