diff --git a/Composer/packages/adaptive-flow/__tests__/adaptive-flow-renderer/layouters/calculateNodeBoundary.test.ts b/Composer/packages/adaptive-flow/__tests__/adaptive-flow-renderer/layouters/calculateNodeBoundary.test.ts index af7ffd49b8..d352d50559 100644 --- a/Composer/packages/adaptive-flow/__tests__/adaptive-flow-renderer/layouters/calculateNodeBoundary.test.ts +++ b/Composer/packages/adaptive-flow/__tests__/adaptive-flow-renderer/layouters/calculateNodeBoundary.test.ts @@ -13,6 +13,7 @@ import { BranchIntervalX, BranchIntervalY, LoopEdgeMarginLeft, + BranchingNodeMarginRight, } from '../../../src/adaptive-flow-renderer/constants/ElementSizes'; const boundary = new Boundary(); @@ -77,7 +78,7 @@ describe('calculateSwitchCaseBoundary', () => { }); it('should return a box whose property be calcalated by conditionBoundary, choiceBoundary, branchBoundaries', () => { const returnBoundary = { - width: 580 + BranchIntervalX, + width: 580 + BranchIntervalX + BranchingNodeMarginRight, height: 180 + BranchIntervalY * 3, axisX: 140, axisY: 0, diff --git a/Composer/packages/adaptive-flow/src/adaptive-flow-renderer/constants/ElementSizes.ts b/Composer/packages/adaptive-flow/src/adaptive-flow-renderer/constants/ElementSizes.ts index 737adc60d0..46f8f0452d 100644 --- a/Composer/packages/adaptive-flow/src/adaptive-flow-renderer/constants/ElementSizes.ts +++ b/Composer/packages/adaptive-flow/src/adaptive-flow-renderer/constants/ElementSizes.ts @@ -59,6 +59,8 @@ export const BranchIntervalY = ElementInterval.y / 2; // Preserve enough space for condition label text on edges. export const BranchAxisXIntervalMin = 150; +export const BranchingNodeMarginRight = 100; + export const EdgeAddButtonSize = { width: 16, height: 16, diff --git a/Composer/packages/adaptive-flow/src/adaptive-flow-renderer/layouters/calculateNodeBoundary.ts b/Composer/packages/adaptive-flow/src/adaptive-flow-renderer/layouters/calculateNodeBoundary.ts index 7e57c935f4..33ff65fa7b 100644 --- a/Composer/packages/adaptive-flow/src/adaptive-flow-renderer/layouters/calculateNodeBoundary.ts +++ b/Composer/packages/adaptive-flow/src/adaptive-flow-renderer/layouters/calculateNodeBoundary.ts @@ -6,6 +6,7 @@ import { ElementInterval, BranchIntervalX, BranchIntervalY, + BranchingNodeMarginRight, LoopEdgeMarginLeft, DiamondSize, IconBrickSize, @@ -113,7 +114,8 @@ function measureBranchingContainerBoundary( conditionBoundary.width - conditionBoundary.axisX, choiceBoundary.width - choiceBoundary.axisX, branchGroupBoundary.width - branchGroupBoundary.axisX - ); + ) + + BranchingNodeMarginRight; const containerBoundary = new Boundary(); containerBoundary.width = containerWidth;