Skip to content

Commit 0f1cd74

Browse files
committed
WIP
1 parent b5d5319 commit 0f1cd74

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

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

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,31 @@
256256
color: var(--token-simulation-white, #FFFFFF);
257257
}
258258

259+
.bts-close-button {
260+
display: none;
261+
position: absolute;
262+
top: 10px;
263+
right: 50%;
264+
transform: translate(50%, 0);
265+
background-color: #0f62fe;
266+
cursor: pointer;
267+
align-items: center;
268+
justify-content: center;
269+
gap: 6px;
270+
color: var(--token-simulation-white, #FFFFFF);
271+
z-index: 100;
272+
padding: 6px 6px 6px 12px;
273+
font-size: 14px;
274+
}
275+
276+
.bts-close-button:hover {
277+
background-color: #0043ce;
278+
}
279+
280+
.bjs-container.simulation .bts-close-button {
281+
display: flex;
282+
}
283+
259284
.bjs-container .djs-palette {
260285
top: 60px;
261286
}

lib/features/toggle-mode/viewer/ToggleMode.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,20 @@ ToggleMode.prototype._init = function() {
4848
domEvent.bind(this._container, 'click', () => this.toggleMode());
4949

5050
this._canvas.getContainer().appendChild(this._container);
51+
52+
// Add close button for simulation mode
53+
this._closeButton = domify(`
54+
<div class="bts-close-button">
55+
Exit
56+
<svg id="icon" xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 32 32">
57+
<polygon fill="white" points="17.4141 16 24 9.4141 22.5859 8 16 14.5859 9.4143 8 8 9.4141 14.5859 16 8 22.5859 9.4143 24 16 17.4141 22.5859 24 24 22.5859 17.4141 16"/>
58+
</svg>
59+
</div>
60+
`);
61+
62+
domEvent.bind(this._closeButton, 'click', () => this.toggleMode(false));
63+
64+
this._canvas.getContainer().appendChild(this._closeButton);
5165
};
5266

5367
ToggleMode.prototype.toggleMode = function(active = !this._active) {

0 commit comments

Comments
 (0)