@flowgram.ai/fixed-layout-core 1.0.2 → 1.0.6
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 +13 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/index.js +13 -3
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
package/dist/esm/index.js
CHANGED
|
@@ -304,8 +304,18 @@ var InlineBlocksRegistry = {
|
|
|
304
304
|
hidden: true,
|
|
305
305
|
spacing: (node) => getDefaultSpacing2(node.entity, ConstantKeys2.NODE_SPACING),
|
|
306
306
|
isInlineBlocks: true,
|
|
307
|
-
inlineSpacingPre: (
|
|
308
|
-
|
|
307
|
+
inlineSpacingPre: (transform) => {
|
|
308
|
+
if (transform.entity.blocks.length === 0) {
|
|
309
|
+
return 0;
|
|
310
|
+
}
|
|
311
|
+
return getDefaultSpacing2(transform.entity, ConstantKeys2.INLINE_BLOCKS_PADDING_TOP) || DEFAULT_SPACING2.INLINE_BLOCKS_PADDING_TOP;
|
|
312
|
+
},
|
|
313
|
+
inlineSpacingAfter: (transform) => {
|
|
314
|
+
if (transform.entity.blocks.length === 0) {
|
|
315
|
+
return 0;
|
|
316
|
+
}
|
|
317
|
+
return getDefaultSpacing2(transform.entity, ConstantKeys2.INLINE_BLOCKS_PADDING_BOTTOM);
|
|
318
|
+
}
|
|
309
319
|
},
|
|
310
320
|
/**
|
|
311
321
|
* 控制子分支的间距
|
|
@@ -1463,7 +1473,7 @@ var RootRegistry = {
|
|
|
1463
1473
|
return transform.firstChild?.inputPoint || transform.bounds.topCenter;
|
|
1464
1474
|
},
|
|
1465
1475
|
getOutputPoint(transform) {
|
|
1466
|
-
return transform.
|
|
1476
|
+
return transform.lastChild?.outputPoint || transform.bounds.bottomCenter;
|
|
1467
1477
|
}
|
|
1468
1478
|
};
|
|
1469
1479
|
|