Our pure JavaScript Scheduler component

Post by sgodbout »

When we create a dependency or move a predecessor or successor event, we notice that the lag is always defaults 0 rather than being automatically calculated (which is causing displacement issues with our successor events where they attempt to reflect a lag of 0)

We noticed that there used to be an autoCalculateLag feature, that no longer seems to be supported (or at least I can't find it in the docs anymore, or was only available for Gantt product).

This is clearly a useful functionality and it should be possible to make it a default setting.
Is there something we're missing?

Post by alex.l »

HI sgodbout,

You're right, there is no such feature in vanilla products now. I've opened a feature request https://github.com/bryntum/support/issues/5014
Regarding to default settings. That's possible to set default value in DependencyModel.

Or you could use events and set required data in there

All the best,

Post by alex.l »

After more deep investigation, I found that this feature is implemented already, but supported in Gantt only. It was renamed and updated, please see https://bryntum.com/docs/gantt/api/Gantt/feature/TaskDrag#config-pinSuccessors

Set to true to enable dragging task while pinning dependent tasks. By default, this behavior is activated if you hold CTRL key during drag. Alternatively, you may provide key name to use.

All the best,

Post by sgodbout »


Well for starters we're using the Scheduler, so already pinSuccessors wouldn't work for us if it's Gantt only.
And our issue comes up during dependency creation as well, not just when when dragging events.
So it would only have been a partial fix

I've already tried playing with dependencyCreateDrop, along with beforeEventDrop and afterEventDrop to get things running, but it's still ending up buggy at the moment (only works properly sometimes).

It seems that an autoCalculate or pinSuccessor option would be much wanted behaviour for the Scheduler.
Is there a reason it's not being added?

Post by Maxim Gorkovsky »

Could you explain what is your use case? Why do you need recalculate lag always? In Scheduler dependencies are purely visual and lag does not affect behavior.

Speaking of setting lag automatically on dependency, there are two components to that:

  1. listen to add event on the dependency store and calculate lag from source/targetEvent
  2. listen to update event on the event store and recalculate lag, if you want lag always to represent distance from source to target

Can you share some code snippets of the implementation which did not work for you?

It seems that an autoCalculate or pinSuccessor option would be much wanted behaviour for the Scheduler.
Is there a reason it's not being added?

We tend to add features which get requested a lot and as far as I know there is not much demand for this one (judging by users' feedback)

Post Reply