Skip to main content
Version: 4.2

config

config is an object that contains the following properties.

Properties​

cellDefaultsMergeStrategy​

cellDefaultsMergeStrategy: util.MergeCustomizer | null;

How are array-type default model attributes merged with array-type attributes provided in the cell constructor?

By default, the constructor array-type attribute value replaces the default array-type attribute value. You may modify this behavior by providing your own merge customizer callback - see the documentation of util.merge() for more information.

note

Cells constructed with { mergeArrays: true } behave differently. The constructor array-type attribute value is merged into the default array-type attribute value, regardless of config.cellDefaultsMergeStrategy.

cellMergeStrategy​

cellMergeStrategy: util.MergeCustomizer | null;

How are array-type model attributes merged with array-type attributes provided in a cell.prop() call?

By default, the new array-type attribute value is merged into the old array-type attribute value. You may modify this behavior by providing your own merge customizer callback - see the documentation of util.merge() for more information.

note

Properties changed with { rewrite: true } behave differently. The new array-type attribute value replaces the old array-type attribute value, regardless of config.cellMergeStrategy.

classNamePrefix​

classNamePrefix: string;

The class name prefix config is for advanced use only. Be aware that if you change the prefix, the JointJS CSS will no longer function properly. The default is joint-.

defaultTheme​

defaultTheme: string;

The default theme used in JointJS. The default is 'default'.

doubleTapInterval​

doubleTapInterval: number;

The maximum delay required for two consecutive touchend events to be interpreted as a double-tap. The default is 300.

layerAttribute​

layerAttribute: string;

layerAttribute is the name of the attribute that defines the cell layer id of a cell. The default is 'layer'.

useCSSSelectors​

useCSSSelectors: boolean;

When set to true the cell selectors could be defined as CSS selectors. If not, only JSON Markup selectors are taken into account. The default is false.

Types​

config​

namespace config {
var useCSSSelectors: boolean;
var classNamePrefix: string;
var defaultTheme: string;
var doubleTapInterval: number;
var cellMergeStrategy: util.MergeCustomizer | null;
var cellDefaultsMergeStrategy: util.MergeCustomizer | null;
var layerAttribute: string;
}