Skip to content

Commit 0df1588

Browse files
authored
Merge pull request #160 from mermaid-js/debug/central-line-in-occurrence-bar
Debug/central line in occurrence bar
2 parents 78c4b04 + 5744e5d commit 0df1588

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/components/DiagramFrame/SeqDiagram/LifeLineLayer/LifeLine.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
<div
33
:id="entity.name"
44
:entity-type="entity.type?.toLowerCase()"
5-
class="lifeline absolute flex flex-col mx-2 transform -translate-x-1/2 h-full"
5+
class="lifeline absolute flex flex-col mx-2 h-full"
6+
:class="{ 'transform -translate-x-1/2': renderParticipants }"
67
:style="{ paddingTop: top + 'px', left: left + 'px' }"
78
>
8-
<div v-show="debug">{{ centerOf(entity.name) }}</div>
99
<participant v-if="renderParticipants" :entity="entity" :offsetTop="top" />
1010
<div v-if="renderLifeLine" class="line w0 mx-auto flex-grow w-px"></div>
1111
</div>

src/components/DiagramFrame/SeqDiagram/MessageLayer/Block/Statement/Interaction/Occurrence/Occurrence.vue

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
:data-x-offset="center"
88
:data-debug-center-of="computedCenter"
99
>
10+
<div
11+
v-if="debug"
12+
class="absolute w-full left-0 bg-amber-700 h-3 -top-2 flex justify-center items-center"
13+
>
14+
<div class="w-px h-full bg-black"></div>
15+
</div>
1016
<collapse-button
1117
v-if="hasAnyStatementsExceptReturn"
1218
:collapsed="collapsed"
@@ -39,6 +45,9 @@ export default {
3945
computed: {
4046
...mapGetters(["centerOf", "messageLayerLeft"]),
4147
...mapState(["code"]),
48+
debug() {
49+
return !!localStorage.zenumlDebug;
50+
},
4251
computedCenter: function () {
4352
try {
4453
return this.centerOf(this.participant);

0 commit comments

Comments
 (0)