From ac2a4b54e75c0c937bcfcfc56c52f8ab13438c5c Mon Sep 17 00:00:00 2001 From: Adam Wulf Date: Thu, 11 Oct 2018 13:46:47 -0500 Subject: [PATCH] Adjust the spacing of the trapezoid --- src/diagrams/flowchart/flowRenderer.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/diagrams/flowchart/flowRenderer.js b/src/diagrams/flowchart/flowRenderer.js index 5d5c45c02..311551f9f 100644 --- a/src/diagrams/flowchart/flowRenderer.js +++ b/src/diagrams/flowchart/flowRenderer.js @@ -346,10 +346,10 @@ export const draw = function (text, id) { const w = bbox.width const h = bbox.height const points = [ - { x: -h / 2, y: 0 }, - { x: w + h / 2, y: 0 }, - { x: w, y: -h }, - { x: 0, y: -h } + { x: - 2 * h / 6, y: 0 }, + { x: w + 2 * h / 6, y: 0 }, + { x: w - h / 6, y: -h }, + { x: h / 6, y: -h } ] const shapeSvg = parent.insert('polygon', ':first-child') .attr('points', points.map(function (d) { @@ -367,10 +367,10 @@ export const draw = function (text, id) { const w = bbox.width const h = bbox.height const points = [ - { x: 0, y: 0 }, - { x: w, y: 0 }, - { x: w + h / 2, y: -h }, - { x: -h / 2, y: -h } + { x: h / 6, y: 0 }, + { x: w - h / 6, y: 0 }, + { x: w + 2 * h / 6, y: -h }, + { x: - 2 * h / 6, y: -h } ] const shapeSvg = parent.insert('polygon', ':first-child') .attr('points', points.map(function (d) {