Timeline: Position today line based on hour of day

pull/5162/head
Roman Roelofsen 8 years ago
parent 40b8d17dc0
commit 9dc823b4d3
  1. 2
      frontend/app/components/wp-table/timeline/wp-timeline.today-line.ts

@ -36,7 +36,7 @@ export function todayLine(viewParams: TimelineViewParameters, elem: HTMLElement)
elem.style.width = "2px";
elem.style.borderLeft = "2px dotted red";
const offsetToday = viewParams.now.diff(viewParams.dateDisplayStart, "days");
const dayProgress = moment().day() / 24;
const dayProgress = moment().hour() / 24;
elem.style.left = calculatePositionValueForDayCount(viewParams, offsetToday + dayProgress);
elem.style.marginLeft = viewParams.scrollOffsetInPx + "px";
}

Loading…
Cancel
Save