Skip to content

Commit

Permalink
#184 ui fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Mrowetz committed Mar 22, 2017
1 parent f0241a3 commit 9d4114d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
9 changes: 4 additions & 5 deletions src/css-raw/perf-cascade.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@

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

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

.water-fall-chart .line-mark {fill: #0aa; opacity: 0.01; stroke-width: 0;}
.water-fall-chart .line-holder.active .line-mark { opacity: 0.5;}
.water-fall-chart .line-label-holder {cursor: pointer;}

.water-fall-chart .mark-holder text {writing-mode:vertical-lr;}

.left-fixed-holder .label-full-bg {fill: #fff; opacity: 0.9}
Expand Down
11 changes: 8 additions & 3 deletions src/ts/waterfall/sub-components/svg-marks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,15 @@ export function createMarks(context: Context, marks: Mark[]) {
let isClickActive = false;
let onLabelMouseEnter = () => {
if (!isHoverActive) {
isHoverActive = true;
addClass(lineHolder, "active");
// firefox has issues with this
// move marker to top
markHolder.parentNode.appendChild(markHolder);
isHoverActive = true;
// assign class later to not break animation with DOM re-order
if (typeof window.requestAnimationFrame === "function"){
window.requestAnimationFrame(() => addClass(lineHolder, "active"));
} else {
addClass(lineHolder, "active");
}
}
};

Expand Down

0 comments on commit 9d4114d

Please sign in to comment.