Skip to content

Commit

Permalink
Merge pull request #160 from mermaid-js/debug/central-line-in-occurre…
Browse files Browse the repository at this point in the history
…nce-bar

Debug/central line in occurrence bar
  • Loading branch information
MrCoder committed Jun 2, 2024
2 parents 78c4b04 + 5744e5d commit 0df1588
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<div
:id="entity.name"
:entity-type="entity.type?.toLowerCase()"
class="lifeline absolute flex flex-col mx-2 transform -translate-x-1/2 h-full"
class="lifeline absolute flex flex-col mx-2 h-full"
:class="{ 'transform -translate-x-1/2': renderParticipants }"
:style="{ paddingTop: top + 'px', left: left + 'px' }"
>
<div v-show="debug">{{ centerOf(entity.name) }}</div>
<participant v-if="renderParticipants" :entity="entity" :offsetTop="top" />
<div v-if="renderLifeLine" class="line w0 mx-auto flex-grow w-px"></div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
:data-x-offset="center"
:data-debug-center-of="computedCenter"
>
<div
v-if="debug"
class="absolute w-full left-0 bg-amber-700 h-3 -top-2 flex justify-center items-center"
>
<div class="w-px h-full bg-black"></div>
</div>
<collapse-button
v-if="hasAnyStatementsExceptReturn"
:collapsed="collapsed"
Expand Down Expand Up @@ -39,6 +45,9 @@ export default {
computed: {
...mapGetters(["centerOf", "messageLayerLeft"]),
...mapState(["code"]),
debug() {
return !!localStorage.zenumlDebug;
},
computedCenter: function () {
try {
return this.centerOf(this.participant);
Expand Down

0 comments on commit 0df1588

Please sign in to comment.