Skip to content

Commit 47a5669

Browse files
author
Michael Mrowetz
committed
#184 ui fixes
1 parent f0241a3 commit 47a5669

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

Diff for: src/css-raw/perf-cascade.css

+4-5
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66

77
.water-fall-chart .left-fixed-holder {overflow: visible;}
88
.water-fall-chart .marker-holder {width:100%;}
9-
.water-fall-chart .line-holder {stroke-width:1; stroke: #ccc; stroke-opacity:0.5;}
9+
.water-fall-chart .line-label-holder {cursor: pointer;}
10+
.water-fall-chart .line-holder {stroke-width:1; stroke: #ccc; stroke-opacity:0.5; transition: all 60ms;}
11+
.water-fall-chart .line-holder .line-mark {fill: #69009e; opacity: 0.01; stroke-width: 0; transition: all 60ms;}
1012
.water-fall-chart .line-holder.active {stroke: #69009e; stroke-width:2; stroke-opacity:1;}
13+
.water-fall-chart .line-holder.active .line-mark { opacity: 0.4;}
1114
.water-fall-chart .type-onload .line-holder {stroke: #c0c0ff;}
1215
.water-fall-chart .type-oncontentload .line-holder {stroke: #d888df;}
1316

@@ -19,10 +22,6 @@
1922
.water-fall-chart .line-end.active,
2023
.water-fall-chart .line-start.active {display: block;}
2124

22-
.water-fall-chart .line-mark {fill: #0aa; opacity: 0.01; stroke-width: 0;}
23-
.water-fall-chart .line-holder.active .line-mark { opacity: 0.5;}
24-
.water-fall-chart .line-label-holder {cursor: pointer;}
25-
2625
.water-fall-chart .mark-holder text {writing-mode:vertical-lr;}
2726

2827
.left-fixed-holder .label-full-bg {fill: #fff; opacity: 0.9}

Diff for: src/ts/waterfall/sub-components/svg-marks.ts

+8-3
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,15 @@ export function createMarks(context: Context, marks: Mark[]) {
7070
let isClickActive = false;
7171
let onLabelMouseEnter = () => {
7272
if (!isHoverActive) {
73-
isHoverActive = true;
74-
addClass(lineHolder, "active");
75-
// firefox has issues with this
73+
// move marker to top
7674
markHolder.parentNode.appendChild(markHolder);
75+
isHoverActive = true;
76+
// assign class later to not break animation with DOM re-order
77+
if (typeof window.requestAnimationFrame === "function") {
78+
window.requestAnimationFrame(() => addClass(lineHolder, "active"));
79+
} else {
80+
addClass(lineHolder, "active");
81+
}
7782
}
7883
};
7984

0 commit comments

Comments
 (0)