jsGanttImproved / ng-gantt

Gantt for Angular 8 based on jsgantt-improved
MIT License
61 stars 28 forks source link

afterDraw not possible due to missing reference to g #13

Closed bitflower closed 5 years ago

bitflower commented 5 years ago

Hi,

it seems that we can not use afterDraw in the Angular version. Or how do we get the reference to the Gantt instance created here https://github.com/jsGanttImproved/ng-gantt/blob/32b3e1c298706cbc36830ade43f5e0559b7112b7/ng-gantt/src/gantt/gantt.component.ts#L44

mariohmol commented 5 years ago

there is a bug.. indeed.. will publish a new version tonight

bitflower commented 5 years ago

Got it working in a very very hacky way so looking forward to a fix ;-)

bitflower commented 5 years ago

Can we get the types for editor somehow exported so working inside afterDraw is easier with intellisense? I think the whole lib is written in Typescript anyway?

mariohmol commented 5 years ago

Sorry about that.. i got an erro in my way https://github.com/ng-packagr/ng-packagr/issues/1365

mariohmol commented 5 years ago

I was trying to update to ang8.. but i not working now..

i updated the current version to have this fix ng-gantt@2.4.0

bitflower commented 5 years ago

It's not working. Details see here: https://github.com/jsGanttImproved/ng-gantt/commit/08fa6c6aaa5e76109fe9bebaa986bdbef3cf6417#r34574249

Can you re-open this issue?

mariohmol commented 5 years ago

Hi.. thanks!!

I just released version 2.4.2 , check if that works for u

bitflower commented 5 years ago

No, because you overwrite afterDraw with console.log.....!

The optionsBefore must be merged into the object afterwards.

This change is wrong: https://github.com/jsGanttImproved/ng-gantt/commit/08fa6c6aaa5e76109fe9bebaa986bdbef3cf6417#diff-91e7bb20fe484de8d0b220a2db38fd6aR51

mariohmol commented 5 years ago

You are right!! pls check v 2.4.3

bitflower commented 5 years ago

Alright, works ;-) Thanks. That's a good start into home time...

BTW: Next time you might want to accept PR. It increases the interest of your project for DEVs and is common practise in OSS. Now nobody sees that I contributed ;-)

mariohmol commented 5 years ago

yess.. i totally up to receive PR =)

there is some issues to work on the js project: https://github.com/jsGanttImproved/jsgantt-improved

if you want to collaborate and have some questions.. please send me an email that i can help you out