Skip to content

Commit 649889a

Browse files
committed
WIP
1 parent c20777e commit 649889a

File tree

3 files changed

+15
-21
lines changed

3 files changed

+15
-21
lines changed

assets/css/bpmn-js-token-simulation.css

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -242,17 +242,7 @@
242242
}
243243

244244
.bts-toggle-mode {
245-
cursor: pointer;
246-
position: absolute;
247-
top: 20px;
248-
left: 20px;
249-
background-color: var(--token-simulation-silver-darken-94, #EFEFEF);
250-
border-radius: 2px;
251-
padding: 6px;
252-
font-size: 16px;
253-
color: var(--token-simulation-grey-darken-30, #212121);
254-
user-select: none;
255-
display: inline-flex;
245+
display: none;
256246
}
257247

258248
.bts-toggle-mode .bts-toggle {

example/visualizer.html

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,19 @@
1414
<style>
1515
.controls {
1616
position: absolute;
17-
top: 10px;
18-
left: 10px;
17+
bottom: 10px;
18+
left: 50%;
19+
transform: translateX(-50%);
20+
width: max-content;
1921
background: white;
20-
padding: 15px;
2122
border: 1px solid #ccc;
2223
border-radius: 4px;
2324
z-index: 100;
2425
}
2526

2627
.controls button {
2728
margin: 5px;
28-
padding: 8px 16px;
29+
padding: 5px;
2930
cursor: pointer;
3031
}
3132

@@ -39,17 +40,12 @@
3940
<body>
4041
<div class="canvas-parent">
4142
<div class="controls">
42-
<h3>Execution Visualizer Demo</h3>
4343
<button id="toggleMode">Toggle Visualization Mode</button>
4444
<button id="step1">Step 1: StartEvent</button>
4545
<button id="step2">Step 2: Task1</button>
4646
<button id="step3">Step 3: Task2</button>
4747
<button id="step4">Step 4: EndEvent</button>
4848
<button id="clear">Clear</button>
49-
<div class="info">
50-
<strong>Instructions:</strong> Toggle mode on, then use step buttons to visualize execution.
51-
Blue = executed, Red = active
52-
</div>
5349
</div>
5450

5551
<div class="canvas" id="canvas"></div>

lib/features/neutral-element-colors/NeutralElementColors.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,27 @@ export default function NeutralElementColors(
1515

1616
if (active) {
1717
this._setNeutralColors();
18+
} else {
19+
this._removeNeutralColors();
1820
}
1921
});
2022
}
2123

2224
NeutralElementColors.prototype._setNeutralColors = function() {
2325
this._elementRegistry.forEach(element => {
2426
this._elementColors.add(element, ID, {
25-
stroke: '#212121',
27+
stroke: '#aaa',
2628
fill: '#fff'
2729
});
2830
});
2931
};
3032

33+
NeutralElementColors.prototype._removeNeutralColors = function() {
34+
this._elementRegistry.forEach(element => {
35+
this._elementColors.remove(element, ID);
36+
});
37+
};
38+
3139
NeutralElementColors.$inject = [
3240
'eventBus',
3341
'elementRegistry',

0 commit comments

Comments
 (0)