File tree Expand file tree Collapse file tree 3 files changed +15
-21
lines changed
lib/features/neutral-element-colors Expand file tree Collapse file tree 3 files changed +15
-21
lines changed Original file line number Diff line number Diff line change 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 {
Original file line number Diff line number Diff line change 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 : 8 px 16 px ;
29+ padding : 5 px ;
2930 cursor : pointer;
3031 }
3132
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 >
Original file line number Diff line number Diff 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
2224NeutralElementColors . 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+
3139NeutralElementColors . $inject = [
3240 'eventBus' ,
3341 'elementRegistry' ,
You can’t perform that action at this time.
0 commit comments