Class: MMEditor

MMEditor(config)

new MMEditor(config)

初始化配置

Parameters:
Name Type Description
config Object

初始化配置.

Properties
Name Type Description
hideAchor boolean

是否隐藏磁吸.

hideAchorLine boolean

是否隐藏磁吸线

anchorDistance string

磁吸距离

showBackGrid boolean

是否展示网格

showMiniMap boolean

是否隐藏小地图

mode string

模式是否只读,可选 view

dagreOption Object

dagre的配置

Source:

Extends

Members

container

Properties:
Name Type Description
container HTMLElement

实例dom

Source:

controller

Properties:
Name Type Description
controller Controller

控制器

Source:

dom

Properties:
Name Type Description
dom HTMLElement

容器

Source:

graph

Properties:
Name Type Description
graph Graph

画布

Source:

minimap

Properties:
Name Type Attributes Description
minimap Minimap <nullable>

小地图

Source:

paper

Properties:
Name Type Description
paper Snap.Element
Source:

schema

Properties:
Name Type Description
schema Schema

数据管理器

Source:

svg

Properties:
Name Type Description
svg Snap.Element
Source:

Methods

clear()

清空

Overrides:
Source:

destroy()

销毁函数

Source:

fire(event, data)

Parameters:
Name Type Description
event *
data *
Overrides:
Source:

off(event, offFunc)

关闭绑定的事件

Parameters:
Name Type Description
event *
offFunc *

不传清空所有

Overrides:
Source:

on(event, func, index)

箭头

Parameters:
Name Type Description
event *
func *
index *
Overrides:
Source:

repaint()

重绘

Source:

resize()

重新布局

Source:

Events

format

Type:
  • Object
Properties:
Name Type Description
data Object
Source:

load

Type:
  • Object
Source: