Pointer highlighting timeline tree

Hi,

I tried to implement the pointer highlighting sample (docs.dhtmlx.com/scheduler/sample … reate.html) in my timeline tree scheduler, but it doesn’t work ok.

As you can see in the next screenshot, when I mouseOver the section (Y-Axis) the highlight appears (and it shouldn’t). And if I click the section to expand it, the lightbox appears.

i.imgur.com/RikzrZY.png

Any idea about how to fix it?

Thx

You need to modify the code of custom mouse handler. scheduler.getActionData(native_event) can be used to get the id of current section, and based on it you need to call the markTimespan method ( have such call for sections where highlight is necesary and hide in other case )

Also, you can use something like next as first line of handler to skip highlight in timeline mode at all

if (scheduler.getState().mode == "timeline") return;

Ok, now I accomplished to only highlight the current section by adding this to the markTimestamp method:

sections: {timeline: [scheduler.getActionData(native_event).section]},

But how can I differentiate when I mouseOver a section header or the timeline spaces? I don’t want to hightlight the section headers:

i.imgur.com/8nbtzO3.png

Thx

If you have some property in the initial config, which separates rows and section, then you can use getSection API to get such section object and check the related property ( id for getSection can be taken from getActionData result )

Sorry Stanislav, I don’t understand that. How can I set a property to separate rows and sections? Can you give some simple example?

Thx

You can use

[code]var id = scheduler.getActionData(ev).section;
var section = scheduler.getSection(id);

if (section.children) return; //parent section, ignore it
//else place code to show highlight[/code]

If problem still occurs please provide a demo link or a sample.

It works like a charm! Thx again