dalestone / angular2-gantt

A gantt library written in angular
MIT License
67 stars 38 forks source link

Long-term projects do not work correctly. #38

Open jmddesarrollo opened 6 years ago

jmddesarrollo commented 6 years ago

Sorry for my English.

The module did not paint well tasks distant in time (with more than a month) because the comparison between the start date of the task and the scale date is done per day (getDate) instead of full date.

I solved it in file: gantt.service.ts ==> calculateBarLeft, and I code:

const startFullDate = start.getFullYear () + '-' + start.getMonth () + '-' + start.getDate ();
const scaleFullDate = scale [i].getFullYear () + '-' + scale [i].getMonth () + '-' + scale [i].getDate ();
// if (start.getDate () === scale [i].getDate ()) {
if (startFullDate === scaleFullDate) {

Hope that helps. Thank you for your great work with the gantt module.