This commit is contained in:
Jeremy Funk 2023-03-24 00:18:52 +01:00
parent 2d815e9626
commit fd9680a050
2 changed files with 2 additions and 2 deletions

View File

@ -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(

View File

@ -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) {