Home Reference Source
import NodeSettings from 'd3-mitch-tree/js/NodeSettings.js'
public class | source

NodeSettings

Constructor Summary

Public Constructor
public

constructor(ownerObject: object, options: object)

Member Summary

Private Members
private
private
private
private

Method Summary

Public Methods
public

Gets the owner object.

public

Gets the horizontal spacing value.

public

Gets the sizing mode.

public

Gets the vertical spacing value.

public

setHorizontalSpacing(newHorizontalSpacing: number): object

Sets the horizontal spacing value.

public

setSizingMode(newSizingMode: 'nodeSize' | 'size'): object

Sets the sizing mode.

public

setVerticalSpacing(newVerticalSpacing: number): object

Sets the vertical spacing value.

Public Constructors

public constructor(ownerObject: object, options: object) source

Params:

NameTypeAttributeDescription
ownerObject object

The owner object

options object

The options for the node settings.

options.sizingMode 'nodeSize' | 'size'
  • optional
  • default: size

The sizing mode. Should be either 'nodeSize' to automatically size the SVG based on the nodes, or 'size' to use the configured width and height.

options.horizontalSpacing number
  • optional
  • default: 25

The horizontal spacing value.

options.verticalSpacing number
  • optional
  • default: 25

The vertical spacing value.

Private Members

private _horizontalSpacing: * source

private _ownerObject: * source

private _sizingMode: * source

private _verticalSpacing: * source

Public Methods

public back(): object source

Gets the owner object.

Return:

object

The owner object.

public getHorizontalSpacing(): number source

Gets the horizontal spacing value.

Return:

number

The horizontal spacing value.

public getSizingMode(): string source

Gets the sizing mode.

Return:

string

The configured node sizing mode.

public getVerticalSpacing(): number source

Gets the vertical spacing value.

Return:

number

The vertical spacing value.

public setHorizontalSpacing(newHorizontalSpacing: number): object source

Sets the horizontal spacing value.

Params:

NameTypeAttributeDescription
newHorizontalSpacing number

The new horizontal spacing value.

Return:

object

The node settings object.

public setSizingMode(newSizingMode: 'nodeSize' | 'size'): object source

Sets the sizing mode.

Params:

NameTypeAttributeDescription
newSizingMode 'nodeSize' | 'size'

The sizing mode. Should be either 'nodeSize' to automatically size the SVG based on the nodes, or 'size' to use the configured width and height.

Return:

object

The node settings object.

public setVerticalSpacing(newVerticalSpacing: number): object source

Sets the vertical spacing value.

Params:

NameTypeAttributeDescription
newVerticalSpacing number

The new vertical spacing value.

Return:

object

The node settings object.