I followed this snippet to achieve a custom style for the task if the tasks overlap each other and it is working great.
My problem is that this code is implemented with onAfterTaskUpdate attachEvent and it is not taken into consideration the situation if the orders come by default overlap and not when the user moves them around.
I tried to look at something similar attachEvent that will listen onBeforeTaskUpdate (?) which also will get as parameters id and task and I didn’t find.