From 7cc7a8f47c056ed13c302c08645aec7abd416bd3 Mon Sep 17 00:00:00 2001 From: hopoverflow <62627631+hopoverflow@users.noreply.github.com> Date: Fri, 26 Feb 2021 13:16:00 -0800 Subject: [PATCH] #1317 : Add state id to state diagram. Move description below separator. Fix issue #1317 --- src/diagrams/state/shapes.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/diagrams/state/shapes.js b/src/diagrams/state/shapes.js index 79452aca0..4b239693a 100644 --- a/src/diagrams/state/shapes.js +++ b/src/diagrams/state/shapes.js @@ -79,7 +79,7 @@ export const drawDescrState = (g, stateDef) => { .attr('y', getConfig().state.textHeight + 1.3 * getConfig().state.padding) .attr('font-size', getConfig().state.fontSize) .attr('class', 'state-title') - .text(stateDef.descriptions[0]); + .text(stateDef.id); const titleBox = title.node().getBBox(); const titleHeight = titleBox.height; @@ -94,7 +94,8 @@ export const drawDescrState = (g, stateDef) => { getConfig().state.dividerMargin + getConfig().state.textHeight ) - .attr('class', 'state-description'); + .attr('class', 'state-description') + .text(stateDef.descriptions[0]); let isFirst = true; let isSecond = true;