@flowgram.ai/free-auto-layout-plugin 1.0.6 → 1.0.8
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/esm/index.js +3 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
package/dist/esm/index.js
CHANGED
|
@@ -2170,7 +2170,7 @@ var LayoutStore = class {
|
|
|
2170
2170
|
if (!from || !to || edge.vertical) {
|
|
2171
2171
|
return;
|
|
2172
2172
|
}
|
|
2173
|
-
const id = `virtual_${groupId}
|
|
2173
|
+
const id = `virtual_${groupId}_from_${from}_to_${to}`;
|
|
2174
2174
|
const layoutEdge = {
|
|
2175
2175
|
id,
|
|
2176
2176
|
entity: edge,
|
|
@@ -2189,7 +2189,7 @@ var LayoutStore = class {
|
|
|
2189
2189
|
if (!from || !to || edge.vertical) {
|
|
2190
2190
|
return;
|
|
2191
2191
|
}
|
|
2192
|
-
const id = `virtual_${groupId}
|
|
2192
|
+
const id = `virtual_${groupId}_from_${from}_to_${to}`;
|
|
2193
2193
|
const layoutEdge = {
|
|
2194
2194
|
id,
|
|
2195
2195
|
entity: edge,
|
|
@@ -2349,7 +2349,7 @@ var LayoutPosition = class {
|
|
|
2349
2349
|
const layoutPosition = {
|
|
2350
2350
|
x: layoutNode.position.x + layoutNode.offset.x,
|
|
2351
2351
|
// layoutNode.position.y 是中心点,但画布节点原点在上边沿的中间,所以 y 坐标需要转化后一下
|
|
2352
|
-
y: layoutNode.position.y - layoutNode.size.height
|
|
2352
|
+
y: layoutNode.position.y + layoutNode.offset.y - (layoutNode.size.height - layoutNode.padding.top - layoutNode.padding.bottom) / 2
|
|
2353
2353
|
};
|
|
2354
2354
|
const deltaX = (layoutPosition.x - transform.position.x) * step / 100;
|
|
2355
2355
|
const deltaY = (layoutPosition.y - transform.position.y) * step / 100;
|