Skip to content

Commit cd10f17

Browse files
committed
Dropshadow effect and rounded labels.
1 parent 1dc0686 commit cd10f17

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

assets/smartgraph_realtime.gif

-222 KB
Loading

smartgraph.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ This should help you understand which styles you can apply to each type of eleme
2222
.vertex {
2323
-fx-stroke-width: 3;
2424
-fx-stroke: #61B5F1;
25-
-fx-stroke-type: inside; /* you should keep this if using arrows */
25+
-fx-stroke-type: inside; /* you should keep this if using arrows; it will keep the shape radius consistent. */
2626
-fx-fill: #B1DFF7;
27+
-fx-effect: dropshadow(gaussian, rgba(0,0,0,0.25), 8, 0.2, 0, 4);
2728
}
2829

2930
.vertex:hover { /* pseudo-classes also work */
@@ -34,11 +35,13 @@ This should help you understand which styles you can apply to each type of eleme
3435
.vertex-label {
3536
-fx-font: bold 8pt "sans-serif";
3637
-fx-padding: 5px;
38+
-fx-effect: dropshadow(gaussian, rgba(0,0,0,0.25), 8, 0.2, 0, 4);
3739
}
3840

3941
.vertex-label:hover {
4042
-fx-background-color: white;
4143
-fx-background-radius: 5;
44+
-fx-border-radius: 5;
4245
-fx-border-color: black;
4346
}
4447

0 commit comments

Comments
 (0)