v7.3.0
SupportExamplesFree Trial

DependencyCreation
Mixin

Mixin for Dependencies feature that handles dependency creation (drag & drop from terminals which are shown on hover). Requires Delayable to be mixed in alongside.

No results

Configs

Configs are options you supply in a configuration object when creating an instance of this class
  • Set to false to not allow creating dependencies

  • Set it to true to allow dependency creation only for parent events (only applies to Scheduler Pro using the NestedEvents feature). 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.

  • false to require a drop on a target event bar side circle to define the dependency type. If dropped on the event bar, the defaultValue of the DependencyModel type field 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

  • false to not show a tooltip while creating a dependency

  • terminalCls : Stringb-sch-terminal

    CSS class used for terminals

  • Where (on event bar edges) to display terminals. The sides are 'start', 'top', 'end' and 'bottom'

Properties

Properties are getters/setters or publicly accessible variables on this class
  • isDependencyCreation : Booleantrue
    READONLY
    ADVANCED
    Identifies an object as an instance of DependencyCreation class, or subclass thereof.
  • false to require a drop on a target event bar side circle to define the dependency type. If dropped on the event bar, the defaultValue of the DependencyModel type field 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.

Functions

Functions are methods available for calling on the class
    • createConnector( )
      private

      Creates a connector line that visualizes dependency source & target

    • createDependency( )
      internal

      Create a new dependency from source terminal to target terminal

    • onMouseMove( )
      private

      Update connector line showing dependency between source and target when mouse moves. Also check if mouse is over a valid target terminal

    • onMouseUp( )
      private
      ASYNC

      Create a new dependency if mouse release over valid terminal. Hides connector

    • onTerminalMouseOut( )
      private

      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

    • removeConnector( )
      private

      Remove connector

    • abort( )

      Aborts dependency creation, removes proxy and cleans up listeners

    Events

    Events are triggered for certain actions in this class and can be listened for to react to those actions in your code

    Event handlers

    Event handlers are callbacks called as a result of certain actions in this class

    CSS variables

    CSS variables that can be set to adjust appearance
    Name Description
    --b-dependency-invalid-color Color for an invalid dependency line during creation
    --b-dependency-terminal-border-color Dependency terminal border color. By default it matches event border color to match its look
    --b-dependency-terminal-border-style Dependency terminal border style
    --b-dependency-terminal-border-width Dependency terminal border width
    --b-dependency-terminal-color Dependency terminal fill color
    --b-dependency-terminal-invalid-color Color for an invalid dependency terminal during creation
    --b-dependency-terminal-offset Dependency terminal offset from the event edge, negative values move away from the event
    --b-dependency-terminal-size Dependency terminal size
    --b-dependency-terminal-valid-color Color for a valid dependency terminal during creation
    --b-dependency-terminal-z-index Dependency terminal z-index
    --b-dependency-tooltip-invalid-header-background Background used in the header of the dependency creation tooltip when the dependency is invalid
    --b-dependency-tooltip-invalid-header-color Color used in the header of the dependency creation tooltip when the dependency is invalid
    --b-dependency-tooltip-valid-header-background Background used in the header of the dependency creation tooltip when the dependency is valid
    --b-dependency-tooltip-valid-header-color Color used in the header of the dependency creation tooltip when the dependency is valid
    --b-dependency-valid-color Color for a valid dependency line during creation
    Hovered
    --b-dependency-terminal-hover-color Dependency terminal hover fill color

    Source path

    Scheduler/feature/mixin/DependencyCreation.js

    Contents