Skip to main content

lineConfig

Description

Optional. An object with default configuration for the newly added connector lines

info

The settings will be applied to the new connector lines which are added via the editor

Usage

lineConfig?: {
lineType?: "dash" | "line",
lineDirection?: "backArrow" | "forwardArrow",
arrowsHidden?: boolean,
};

Parameters

The lineConfig object contains the following parameters:

  • lineType - (optional) the default type of the new connector lines
  • lineDirection - (optional) the direction of the new connector lines
  • arrowsHidden - (optional) defines whether the arrows of the new connector lines should be hidden
note

The lineDirection and arrowsHidden parameters work only in the default mode of the editor (type: "default")

Default config

lineConfig: {
lineType:"line",
lineDirection: "forwardArrow",
arrowsHidden: false
}

Example

const editor = new dhx.DiagramEditor("editor_container", {
type: "default",
lineConfig: {
lineType: "dash",
lineDirection: "backArrow",
arrowsHidden: true,
},
// other config parameters
});

Change log: Added in v4.2

Related sample: Diagram editor. Setting the default type for newly added connector lines