Skip to content

Commit 0639b1f

Browse files
committed
GLSP-31: Update workflow example (standalone)
1 parent 40f249a commit 0639b1f

7 files changed

Lines changed: 1027 additions & 114 deletions

File tree

examples/workflow-glsp/css/diagram.css

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,92 +15,103 @@
1515
********************************************************************************/
1616

1717
.sprotty-graph {
18-
font-size: 15pt;
18+
font-size: 14pt;
1919
border: none;
2020
height: 100%;
2121
}
2222

2323
.sprotty-text {
24-
font-size: 12pt;
24+
font-size: 11pt;
2525
text-anchor: middle;
2626
}
2727

2828
.sprotty-node {
2929
stroke-width: 0;
30-
font-weight: bold;
30+
font-weight: 600;
31+
filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.12)) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.06));
3132
}
3233

3334
.sprotty-label {
3435
stroke-width: 0;
35-
fill: #000;
36+
fill: #1e293b;
3637
font-weight: inherit;
3738
text-align: inherit;
3839
font-size: 100%;
3940
user-select: none;
4041
}
4142

4243
.sprotty-label.heading {
43-
font-weight: normal;
44-
font-size: 0.7em;
45-
fill: #f0f3f8;
44+
font-weight: 500;
45+
font-size: 0.65em;
46+
fill: rgba(255, 255, 255, 0.82);
47+
letter-spacing: 0.02em;
48+
}
49+
50+
.task .sprotty-label,
51+
.category .sprotty-label {
52+
fill: #ffffff;
53+
}
54+
55+
.task .sprotty-label.heading,
56+
.category .sprotty-label.heading {
57+
fill: rgba(255, 255, 255, 0.82);
4658
}
4759

4860
.icon path {
4961
stroke-width: 0;
50-
fill: #f0f3f8;
62+
fill: rgba(255, 255, 255, 0.95);
5163
}
5264

5365
.icon .icon-background {
5466
fill: transparent;
5567
}
5668

5769
.task.automated > .sprotty-node {
58-
fill: #5b9fa8;
70+
fill: #2d8a9a;
5971
}
6072

6173
.task.manual > .sprotty-node {
62-
fill: #db8651;
74+
fill: #c27856;
6375
}
6476

6577
.category > .sprotty-node {
66-
fill: #5c87bd;
78+
fill: #5478a8;
6779
}
6880

6981
.category .category > .sprotty-node {
70-
/** Add a border to nested categories, so we can distinguish them */
71-
stroke: #38679a;
72-
fill: #6f9ad0;
82+
stroke: #3f6290;
83+
fill: #6a8fbe;
7384
stroke-width: 1;
7485
}
7586

7687
.sprotty-edge.weighted.low:not(.selected, .navigable-element, .search-highlighted),
7788
.sprotty-edge.weighted.low:not(.selected, .navigable-element, .search-highlighted) .arrow {
78-
stroke: rgb(128, 90, 233);
89+
stroke: #7088c0;
7990
}
8091

8192
.sprotty-edge.weighted.low:not(.selected, .navigable-element, .search-highlighted) .arrow {
82-
fill: rgb(128, 90, 233);
93+
fill: #7088c0;
8394
}
8495

8596
.sprotty-edge.weighted:not(.selected, .navigable-element, .search-highlighted),
8697
.sprotty-edge.weighted:not(.selected, .navigable-element, .search-highlighted) .arrow,
8798
.sprotty-edge.weighted.medium:not(.selected, .navigable-element, .search-highlighted),
8899
.sprotty-edge.weighted.medium:not(.selected, .navigable-element, .search-highlighted) .arrow {
89-
stroke: rgb(98, 60, 193);
100+
stroke: #5570b5;
90101
}
91102

92103
.sprotty-edge.weighted:not(.selected, .navigable-element, .search-highlighted) .arrow,
93104
.sprotty-edge.weighted.medium:not(.selected, .navigable-element, .search-highlighted) .arrow {
94-
fill: rgb(98, 60, 193);
105+
fill: #5570b5;
95106
}
96107

97108
.sprotty-edge.weighted.high:not(.selected, .navigable-element, .search-highlighted),
98109
.sprotty-edge.weighted.high:not(.selected, .navigable-element, .search-highlighted) .arrow {
99-
stroke: rgb(68, 30, 163);
110+
stroke: #3a58a8;
100111
}
101112

102113
.sprotty-edge.weighted.high:not(.selected, .navigable-element, .search-highlighted) .arrow {
103-
fill: rgb(68, 30, 163);
114+
fill: #3a58a8;
104115
}
105116

106117
.sprotty-comp {

examples/workflow-glsp/src/workflow-startup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ export class WorkflowStartup implements IDiagramStartup {
2525
@inject(TYPES.IGridManager) @optional() protected gridManager?: IGridManager;
2626

2727
preRequestModel(): MaybePromise<void> {
28-
this.gridManager?.setGridVisible(true);
28+
this.gridManager?.setGridVisible(false);
2929
}
3030
}

examples/workflow-glsp/src/workflow-views.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export class WorkflowEdgeView extends PolylineEdgeViewWithGapsOnIntersections {
4141
<path
4242
class-sprotty-edge={true}
4343
class-arrow={true}
44-
d='M 1,0 L 10,-4 L 10,4 Z'
44+
d='M 0,0 L 9,-3.5 L 9,3.5 Z'
4545
transform={`rotate(${toDegrees(angleOfPoint(Point.subtract(p1, p2)))} ${p2.x} ${p2.y}) translate(${p2.x} ${p2.y})`}
4646
/>
4747
);
@@ -77,7 +77,7 @@ export class IconView extends ShapeView {
7777

7878
d={icon}
7979
/>
80-
<rect class-icon-background x={0} y={0} width={25} height={20} />
80+
<rect class-icon-background x={0} y={0} width={25} height={20} rx={4} ry={4} />
8181
{context.renderChildren(element)}
8282
</g>
8383
);

0 commit comments

Comments
 (0)