Skip to content

Commit

Permalink
fix function typing and formating
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Mrowetz committed Jan 8, 2017
1 parent fa909a6 commit 80cbf62
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
4 changes: 1 addition & 3 deletions src/ts/typing/paging.d.ts
@@ -1,6 +1,4 @@
import {WaterfallData} from "./waterfall";

// Callback called when the selected HAR page is changes
export interface OnPagingCb {
(pageIndex: number, activePage: WaterfallData): any;
}
export type OnPagingCb = (pageIndex: number, activePage: WaterfallData) => any;
10 changes: 5 additions & 5 deletions src/ts/waterfall/sub-components/svg-general-components.ts
Expand Up @@ -2,11 +2,11 @@
* Creation of sub-components of the waterfall chart
*/

import {roundNumber} from "../../helpers/misc";
import { roundNumber } from "../../helpers/misc";
import * as svg from "../../helpers/svg";
import {requestTypeToCssClass} from "../../transformers/styling-converters";
import { requestTypeToCssClass } from "../../transformers/styling-converters";
import { OverlayChangeEvent } from "../../typing/open-overlay";
import {WaterfallEntry} from "../../typing/waterfall";
import { WaterfallEntry } from "../../typing/waterfall";
import * as overlayChangesPubSub from "../details-overlay/overlay-changes-pub-sub";

/**
Expand All @@ -19,7 +19,7 @@ import * as overlayChangesPubSub from "../details-overlay/overlay-changes-pub-su
* @param {boolean} addLabel if true a time label is added to the marker-line
*/
let appendSecond = (timeHolder: SVGGElement, diagramHeight: number,
secsTotal: number, sec: number, addLabel: boolean = false) => {
secsTotal: number, sec: number, addLabel: boolean = false) => {
const secPerc = 100 / secsTotal;
/** just used if `addLabel` is `true` - for full seconds */
let lineLabel;
Expand All @@ -34,7 +34,7 @@ let appendSecond = (timeHolder: SVGGElement, diagramHeight: number,
x = roundNumber(secPerc * sec) - 0.5 + "%";
css["text-anchor"] = "end";
}
lineLabel = svg.newTextEl(sec + "s", {x, y: diagramHeight}, css);
lineLabel = svg.newTextEl(sec + "s", { x, y: diagramHeight }, css);
}

const x = roundNumber(secPerc * sec) + "%";
Expand Down

0 comments on commit 80cbf62

Please sign in to comment.