I am building a gantt which data is loaded on demand (when the user clicks the + icon new data comes from the backend).
If i have dependency between tasks which have different parent tasks there is something strange about how task.$source and/or task.$target work.
Here is the scenario:
Parent_Task_2 -> parent_task_2_SUB_TASK
So there is a LINK between parent_task_1_SUB_TASK and parent_task_2_SUB_TASK
When i click the Parent_Task_1 (+) button and the data is loaded from the backend parent_task_1_SUB_TASK.$source.length and/or …$target.length is greater than zero
when i click the Parent_Task_2 (+) button and the data is loaded from the backend parent_task_2_SUB_TASK.$source.length and/or …$target.length is greater than zero
if call parent_task_1_SUB_TASK.$source.length and/or …$target.length the length is ZERO!??
Any solution to this problem?
I use this code inside gantt.addTaskLayer function.