tracking-code-which-will-go-to-the-HEAD DefaultLayout

Class

DefaultLayout

DefaultLayout(pluginData, viewport)

Class that represents algorithms to automatically arrange components by computing optimal positions. The goal of implemented algorithms is to maximize human readability.
Constructor

# new DefaultLayout(pluginData, viewport)

Default constructor.
Parameters:
Name Type Description
pluginData DefaultData Plugin data storage.
viewport object D3 selection of the view port.

View Source draw/layout/DefaultLayout.js, line 7

Members

DefaultData

# pluginData

Plugin data storage.

View Source draw/layout/DefaultLayout.js, line 18

object

# viewport

D3 selection of the view port.

View Source draw/layout/DefaultLayout.js, line 24

Methods

# generateComponentsLayout(id, keepPosition) → {boolean}

Generate layout of a container. Will update all component drawOption with new position and size.
Parameters:
Name Type Description
id string Container id, null for root container.
keepPosition boolean If true, rearrange only components without a specified position; otherwise, rearrange all components.

View Source draw/layout/DefaultLayout.js, line 36

Return true on successful generation.
boolean

# resize(id) → {boolean}

Resize component to its minimum size.
Parameters:
Name Type Description
id string Id of component to resize.

View Source draw/layout/DefaultLayout.js, line 46

Return true on successful resizing.
boolean