mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-04 08:06:43 +02:00
Adjust the spacing of the trapezoid
This commit is contained in:
@@ -346,10 +346,10 @@ export const draw = function (text, id) {
|
|||||||
const w = bbox.width
|
const w = bbox.width
|
||||||
const h = bbox.height
|
const h = bbox.height
|
||||||
const points = [
|
const points = [
|
||||||
{ x: -h / 2, y: 0 },
|
{ x: - 2 * h / 6, y: 0 },
|
||||||
{ x: w + h / 2, y: 0 },
|
{ x: w + 2 * h / 6, y: 0 },
|
||||||
{ x: w, y: -h },
|
{ x: w - h / 6, y: -h },
|
||||||
{ x: 0, y: -h }
|
{ x: h / 6, y: -h }
|
||||||
]
|
]
|
||||||
const shapeSvg = parent.insert('polygon', ':first-child')
|
const shapeSvg = parent.insert('polygon', ':first-child')
|
||||||
.attr('points', points.map(function (d) {
|
.attr('points', points.map(function (d) {
|
||||||
@@ -367,10 +367,10 @@ export const draw = function (text, id) {
|
|||||||
const w = bbox.width
|
const w = bbox.width
|
||||||
const h = bbox.height
|
const h = bbox.height
|
||||||
const points = [
|
const points = [
|
||||||
{ x: 0, y: 0 },
|
{ x: h / 6, y: 0 },
|
||||||
{ x: w, y: 0 },
|
{ x: w - h / 6, y: 0 },
|
||||||
{ x: w + h / 2, y: -h },
|
{ x: w + 2 * h / 6, y: -h },
|
||||||
{ x: -h / 2, y: -h }
|
{ x: - 2 * h / 6, y: -h }
|
||||||
]
|
]
|
||||||
const shapeSvg = parent.insert('polygon', ':first-child')
|
const shapeSvg = parent.insert('polygon', ':first-child')
|
||||||
.attr('points', points.map(function (d) {
|
.attr('points', points.map(function (d) {
|
||||||
|
Reference in New Issue
Block a user