.addTaskLayer doesn't fire after second init

I’m doing something similar to this example:
docs.dhtmlx.com/gantt/desktop__baselines.html

it renders fine on the first init, but on the second one the baselines are not rendered, looks like the event (addTaskLayer) doesnt fire.

I have a sample code that reproduces the problem (attached)
HtmlPage.zip (2.29 KB)

Hi,
The custom layers are dropped after re-initialization. You can add them using onGanttReady event, so the layer will be reapplied on each initialization:[code]gantt.attachEvent(“onGanttReady”, function(){
// adding baseline display
gantt.addTaskLayer(function draw_planned(task) {
if (task.planned_start && task.planned_end) {

}
return false;
});

});[/code]
also note, that v3.0 has a related bug with onGanttReady event. Currently it fires after gantt is initialized and rendered, while should go after initialization but before rendering.
This means that you’ll need to call ‘gantt.render()’ after adding the layer, in order to apply the changes.

It has been fixed in dev version, you can open a support ticket or send be a PM with your license number and I’ll send you fix

docs.dhtmlx.com/gantt/api__gantt … event.html