Class: ERLayout

ERLayout

ER layout

Entity Relationship Structure
tree = [
    {
        type: 'node',
        id: 'uniqueID',
        properties: [
            {
                name: 'xxxx',
                ref: someUniqueId,
                description: 'xxxxxx',
            },
            ...
        ]
    },
    ...
]

new ERLayout()

Implements:

Members


erNodes :Array.<LayoutNode>

布局节点数组

Type:

flowLinkStack :Array.<Layout~LinkMeta>

布局连线单元数组

Type:

flowStack :Array.<Layout~NodeMeta>

布局节点单元数组

Type:

static :boolean

false 不需要布局变化检查

Type:
  • boolean

Methods


reflow(group)

重排 在实现时,通过计算栈内每个元素的位置来重排

Parameters:
Name Type Description
group Group | JFlow

栈对象

Implements:

reOrder(tree)

从 tree 计算布局

Parameters:
Name Type Description
tree AstNode

ER 树


staticCheck(instance, jflow)

对象布局位置检查,在static为true时生效

Parameters:
Name Type Description
instance Node

目标节点对象

jflow JFlow

JFlow对象

Implements:
Returns:
Type
Boolean

Type Definitions


Configs

ER布局数据源配置

Type:
  • Object
Properties:
Name Type Description
entityRelationship Array.<ERLayout~sourceConfigs>

关系


sourceConfigs

ER source

Type:
  • Object
Properties:
Name Type Description
type string

node

id string

唯一标识

properties Array.<Object>

描述