mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-10 02:49:40 +02:00
Fix bug
This commit is contained in:
@@ -2,7 +2,7 @@ import { imgSnapshotTest, renderGraph } from '../../helpers/util.js';
|
|||||||
|
|
||||||
describe('Gantt diagram', () => {
|
describe('Gantt diagram', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.clock(new Date('2010-10-10').getTime());
|
cy.clock(new Date('1010-10-10').getTime());
|
||||||
});
|
});
|
||||||
it('should render a gantt chart', () => {
|
it('should render a gantt chart', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
|
@@ -36,7 +36,7 @@ export const setConf = function () {
|
|||||||
* @param orderOffset
|
* @param orderOffset
|
||||||
*/
|
*/
|
||||||
const getMaxIntersections = (tasks, orderOffset) => {
|
const getMaxIntersections = (tasks, orderOffset) => {
|
||||||
let timeline = [...tasks].map(() => -1);
|
let timeline = [...tasks].map(() => -Infinity);
|
||||||
let sorted = [...tasks].sort((a, b) => a.startTime - b.startTime || a.order - b.order);
|
let sorted = [...tasks].sort((a, b) => a.startTime - b.startTime || a.order - b.order);
|
||||||
let maxIntersections = 0;
|
let maxIntersections = 0;
|
||||||
for (const element of sorted) {
|
for (const element of sorted) {
|
||||||
|
Reference in New Issue
Block a user