mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
Fix bug
This commit is contained in:
parent
2d815e9626
commit
fd9680a050
@ -2,7 +2,7 @@ import { imgSnapshotTest, renderGraph } from '../../helpers/util.js';
|
||||
|
||||
describe('Gantt diagram', () => {
|
||||
beforeEach(() => {
|
||||
cy.clock(new Date('2010-10-10').getTime());
|
||||
cy.clock(new Date('1010-10-10').getTime());
|
||||
});
|
||||
it('should render a gantt chart', () => {
|
||||
imgSnapshotTest(
|
||||
|
@ -36,7 +36,7 @@ export const setConf = function () {
|
||||
* @param 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 maxIntersections = 0;
|
||||
for (const element of sorted) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user