jsGanttImproved / jsgantt-improved

Javascript Gantt: fully featured gantt chart component built entirely with JS and CSS. No images or external libs required.
https://jsganttimproved.github.io/jsgantt-improved
Other
483 stars 249 forks source link

Fix for jsGanttImproved/ng-gantt#35 (WIP) #323

Closed agarciacalvo closed 1 year ago

agarciacalvo commented 4 years ago

I was working on this but the solution I made need to change the JSGantt calls (see changed docs/index.js).

Also, it's needed to change line 4 of ng-gantt.js to:

import { JSGantt } from 'jsgantt-improved';

And line 42 to:

const g = this.editor = new JSGantt.GanttChart(this.ganttEditorContainer.nativeElement, this.format);

Hope @mariohmol can finish the job :)

mariohmol commented 4 years ago

The problem here is this JSGantt.JSGantt.GanttChart its duplicated right

agarciacalvo commented 4 years ago

Yes. This appears after changing index.ts to remove:

module.exports = jsGantt.JSGantt;

Because Angular fails if you mix module.exports & export. The other side efect in ng-gantt.ts I think is better now, importing all JSGantt and not directrly GanttChart.

mariohmol commented 4 years ago

but check it out.. if someone will use in vanilla js.. will be something like this

g = new JSGantt.JSGantt.GanttChart(document.getElementById('embedded-Gantt'), 'week');

its weird making it twice like JSGantt.JSGantt.GanttChart

agarciacalvo commented 4 years ago

It's weird, and It's mandatory to avoid this silly breaking change, I think.

But I can't get it rigth. May can we ask for help opening an issue on this project?