Dependencies
Feature
Extends the Scheduler's Dependencies feature to integrate with the Scheduler Pro scheduling engine. It renders dependency lines between events and supports interactive creation of new dependencies by dragging from one event's dependency terminal to another. All dependency creation and modification operations are wrapped in project transactions, ensuring that the scheduling engine processes the changes atomically and can revert them if needed.
This feature is enabled by default.
const schedulerPro = new SchedulerPro({
features : {
dependencies : {
radius : 5,
highlightDependenciesOnEventHover : true
}
}
});
See also
- DependencyModel — The data model representing a dependency
- DependencyStore — The store managing dependency records
- DependencyEdit — Popup editor for dependency data
Configs
Configs are options you supply in a configuration object when creating an instance of this class-
The CSS class applied to dependency lines
-
The clickable/touchable width of the dependency line in pixels. Draws an invisible but wider line along the same path as each dependency, making lines much easier to click and tap on touch devices. The tradeoff is that twice as many SVG lines will be drawn, which can affect performance with many visible dependencies. Set to
nullto disable the wider hit area and only use the visible line width.Has a corresponding runtime clickWidth property.
-
Specify
falseto prevent dependencies from being redrawn during event interaction, such as dragging, resizing or rescheduling through other means, including when events animate into place. This makes interaction smoother, but dependency lines will not be updated until the interaction is finished.Has a corresponding runtime drawOnEventInteraction property.
-
Specify
falseto prevent dependencies from being drawn during scroll, for smoother scrolling in schedules with lots of dependencies. Dependencies will be drawn when scrolling stops instead.Has a corresponding runtime drawOnScroll property.
-
Specify
falseto not enable simple deletion of dependencies by clicking on them.Has a corresponding runtime enableDelete property.
-
Specify
trueto highlight incoming and outgoing dependencies when hovering an event.Has a corresponding runtime highlightDependenciesOnEventHover property.
-
The CSS class applied to a too narrow dependency line (to hide markers)
-
The CSS class to add to a dependency line when hovering over it
-
The CSS class representing a delete icon shown when clicking a dependency line
-
Set to
falseto not allow creating dependencies -
Set it to
trueto allow dependency creation only for parent events (only applies to Scheduler Pro using theNestedEventsfeature). Normally the nested event container inside parent events cannot be scrolled when using dependencies, but by enabling this setting and limiting to where dependencies can be drawn scrolling will be enabled. -
falseto require a drop on a target event bar side circle to define the dependency type. If dropped on the event bar, thedefaultValueof the DependencyModeltypefield will be used to determine the target task side.Has a corresponding runtime allowDropOnEventBar property.
-
A tooltip config object that will be applied to the dependency creation Tooltip
-
falseto not show a tooltip while creating a dependency -
CSS class used for terminals
-
Where (on event bar edges) to display terminals. The sides are
'start','top','end'and'bottom' -
Set to
trueto show a tooltip when hovering a dependency lineHas a corresponding runtime showTooltip property.
-
A tooltip config object that will be applied to the dependency hover tooltip. Can be used to for example customize delay
-
Set to
trueto show the lag in the tooltip -
Internal listeners, that cannot be removed by the user.
-
The widget which this plugin is to attach to.
Has a corresponding runtime client property.
-
Set to
falseto disable localization of this object.
Properties
Properties are getters/setters or publicly accessible variables on this class-
Identifies an object as an instance of Delayable class, or subclass thereof.
-
Identifies an object as an instance of Dependencies class, or subclass thereof.
-
Identifies an object as an instance of DependencyCreation class, or subclass thereof.
-
Identifies an object as an instance of DependencyTooltip class, or subclass thereof.
-
Identifies an object as an instance of Events class, or subclass thereof.
-
Identifies an object as an instance of Localizable class, or subclass thereof.
-
A class property getter for the default values of internal properties for this class.
-
An empty array that can be used as a default value.
-
An empty object that can be used as a default value.
-
Identifies an object as an instance of Dependencies class, or subclass thereof.
-
Identifies an object as an instance of InstancePlugin class, or subclass thereof.
-
The clickable/touchable width of the dependency line in pixels. Draws an invisible but wider line along the same path as each dependency, making lines much easier to click and tap on touch devices. The tradeoff is that twice as many SVG lines will be drawn, which can affect performance with many visible dependencies. Set to
nullto disable the wider hit area and only use the visible line width.Has a corresponding clickWidth config.
-
Specify
falseto prevent dependencies from being redrawn during event interaction, such as dragging, resizing or rescheduling through other means, including when events animate into place. This makes interaction smoother, but dependency lines will not be updated until the interaction is finished.Has a corresponding drawOnEventInteraction config.
-
Specify
falseto prevent dependencies from being drawn during scroll, for smoother scrolling in schedules with lots of dependencies. Dependencies will be drawn when scrolling stops instead.Has a corresponding drawOnScroll config.
-
Specify
falseto not enable simple deletion of dependencies by clicking on them.Has a corresponding enableDelete config.
-
Specify
trueto highlight incoming and outgoing dependencies when hovering an event.Has a corresponding highlightDependenciesOnEventHover config.
-
falseto require a drop on a target event bar side circle to define the dependency type. If dropped on the event bar, thedefaultValueof the DependencyModeltypefield will be used to determine the target task side.Has a corresponding allowDropOnEventBar config.
-
A template function that will be called to generate the HTML contents of the dependency creation tooltip. You can return either an HTML string or a DomConfig object.
Has a corresponding creationTooltipTemplate config.
-
Set to
trueto show a tooltip when hovering a dependency lineHas a corresponding showTooltip config.
-
A template function allowing you to configure the contents of the tooltip shown when hovering a dependency line. You can return either an HTML string or a DomConfig object.
Has a corresponding tooltipTemplate config.
-
Returns a copy of the full configuration which was used to configure this object.
-
This property is set to
truebefore theconstructorreturns. -
This property is set to
trueon entry to the destroy method. It remains on the objects after returning fromdestroy(). If isDestroyed istrue, this property will also betrue, so there is no need to test for both (for example,comp.isDestroying || comp.isDestroyed). -
The Widget which was passed into the constructor, which is the Widget we are providing extra services for.
Has a corresponding client config.
-
Get the global LocaleHelper
-
Get the global LocaleManager
Functions
Functions are methods available for calling on the class-
This optional class method is called when a class is mixed in using the mixin() method.
-
Registers this class type with its Factory
-
Deselects the dependency record
-
Redraws dependencies on the next animation frame
-
Aborts dependency creation, removes proxy and cleans up listeners
-
Creates a connector line that visualizes dependency source & target
-
Create a new dependency from source terminal to target terminal
-
Update connector line showing dependency between source and target when mouse moves. Also check if mouse is over a valid target terminal
-
Create a new dependency if mouse release over valid terminal. Hides connector
-
Remove hover styling when mouse leaves terminal. Also hides terminals when mouse leaves one it and not creating a dependency.
-
Start creating a dependency when mouse is pressed over terminal
-
Show terminals when mouse enters event/task element
-
Hide terminals when mouse leaves event/task element
-
Update dependency creation tooltip
-
Remove connector
-
Internal function used to hook destroy() calls when using thisObj
-
Internal function used restore hooked destroy() calls when using thisObj
-
Auto detaches listeners registered from start, if set as detachable
-
Internal function used to run a callback function after an event is triggered
-
Removes all listeners registered to this object by the application.
-
This will merge a feature's (subclass of InstancePlugin) keyMap with it's client's keyMap.