Skip to content

Commit

Permalink
#160 set timescale marker distance dynamically
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Mrowetz committed Mar 2, 2017
1 parent 5d6c1d2 commit 92b61e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ts/waterfall/sub-components/svg-general-components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ let appendSecond = (context: Context, timeHolder: SVGGElement,
* Renders the time-scale SVG elements (1sec, 2sec...)
* @param {Context} context Execution context object
* @param {number} durationMs Full duration of the waterfall
* @param {number} subSecondStepMs Distant (time in ms) between sub-second time-scales
*/
export function createTimeScale(context: Context, durationMs: number, subSecondStepMs = 200): SVGGElement {
export function createTimeScale(context: Context, durationMs: number): SVGGElement {
let timeHolder = svg.newG("time-scale full-width");
const subSecondStepMs = Math.ceil(durationMs / 10000) * 200;
/** steps between each second marker */
const subSecondSteps = 1000 / subSecondStepMs;
const secs = durationMs / 1000;
Expand Down

0 comments on commit 92b61e5

Please sign in to comment.