Extends
Members
-
_isHit :boolean
-
当前单元碰撞检测状态
Type:
- boolean
- Inherited From:
-
_isMoving :boolean
-
当前单元移动状态
Type:
- boolean
- Inherited From:
-
_isTargeting :boolean
-
当前单元选中状态
Type:
- boolean
- Inherited From:
-
_jflow :JFlow
-
canvas上 jflow 实体
Type:
- Inherited From:
-
absolutePosition :Node~AbsolutePosition
-
Type:
-
anchor :Array.<number>
-
Type:
- Array.<number>
-
backgroundColor :string
-
填充颜色 默认 transparent
Type:
- string
- Inherited From:
-
borderColor :string
-
边框颜色 默认 transparent
Type:
- string
- Inherited From:
-
borderWidth :number
-
边的宽度 默认是 0
Type:
- number
- Inherited From:
-
opacity :number
-
透明度
Type:
- number
- Inherited From:
-
shadowBlur :string
-
阴影扩散范围 默认 5
Type:
- string
- Inherited From:
-
shadowColor :string
-
阴影颜色 空就不显示阴影
Type:
- string
- Inherited From:
-
shadowOffsetX :string
-
阴影偏移 X
Type:
- string
- Inherited From:
-
shadowOffsetY :string
-
阴影偏移 Y
Type:
- string
- Inherited From:
-
visible :boolean
-
元素可见 默认 true
Type:
- boolean
- Inherited From:
Methods
-
bubbleEvent(customEvent)
-
冒泡事件
Parameters:
Name Type Description customEvent
JFlowEvent 自定义事件
- Inherited From:
-
calculateToRealWorld(point)
-
反算回页面的像素坐标
Parameters:
Name Type Description point
Array.<Number> - Inherited From:
Returns:
世界坐标
- Type
- Array.<Number>
-
clone()
-
克隆当前节点.
Returns:
当前节点的副本
- Type
- Node
-
getBoundingDimension()
-
获取宽高
- Inherited From:
Returns:
-
demension 宽高
- Type
- Object
-
demension.width 宽
- Type
- number
-
demension.height 高
- Type
- number
-
getBoundingRect()
-
计算当前的最大外接矩形的
- Inherited From:
Returns:
[leftx, lefty, rightx, righty]
- Type
- Array.<number>
-
getCenter()
-
获取当前所在层级的坐标
- Inherited From:
Returns:
坐标
- Type
- Array.<Number>
-
getIntersectionsInFourDimension()
-
计算当前连线接入点的位置
- Inherited From:
Returns:
-
intersection 交叉点
- Type
- Object
-
intersection[DIRECTION.TOP] 上
- Type
- number
-
intersection[DIRECTION.BOTTOM] 下
- Type
- number
-
intersection[DIRECTION.LEFT] 上
- Type
- number
-
intersection[DIRECTION.RIGHT] 右
- Type
- number
-
isHit(point)
-
判断当前单元是否被命中
Parameters:
Name Type Description point
Array.<number> - Inherited From:
Returns:
- Type
- Boolean
-
onEnterViewbox()
-
当节点离开可视区域的回调
- Inherited From:
-
onLeaveViewbox()
-
当节点离开可视区域的回调
- Inherited From:
-
recalculateUp()
-
从当前布局中删除虚拟布局节点
- Inherited From:
-
render(ctx)
-
绘制单元
Parameters:
Name Type Description ctx
Context2d - Inherited From:
-
setConfig(configs)
-
改变当前配置
Parameters:
Name Type Description configs
Configs The string containing two comma-separated numbers.
- Inherited From:
- Overrides:
Type Definitions
-
AbsolutePosition
-
绝对定位 配置, 绝对定位不受布局影响,相对于当前组来定位
Type:
- object
Properties:
Name Type Description top
number 上距离
bottom
number 下距离
right
number 右距离
left
number 左距离
-
Configs
-
Node 配置
Type:
Properties:
Name Type Description anchor
Array.<number> 坐标
absolutePosition
Node~AbsolutePosition 绝对定位位置
Events
-
afterResolveMovingTarget
-
开始拖拽时,拖拽对象设置之前
Type: object
-
contextclick
-
点击事件(冒泡)
Type: object
-
dblclick
-
右键事件
Type: object
-
dragenter
-
dragenter 进入事件
Type: object
- Inherited From:
Properties:
Name Type Description event
Event 原始事件
instance
Object dragenter的对象
target
target drag 携带的对象(特指从外面拖进canvas的对象)
-
dragleave
-
dragleave 退出事件
Type: object
- Inherited From:
Properties:
Name Type Description event
Event 原始事件
instance
Object dragleave的对象
target
target drag 携带的对象(特指从外面拖进canvas的对象)
-
dragover
-
dragover 进入事件
Type: object
- Inherited From:
Properties:
Name Type Description event
Event 原始事件
instance
Object dragover的对象
target
target drag 携带的对象(特指从外面拖进canvas的对象)
-
drop
-
丢在节点上事件
Type: object
-
instancemousemove
-
instance mousemove 原生事件,仅在无拖拽时触发
Type: object
-
instancePressStart
-
开始拖动对象事件(就是目标对象的拖动事件,事件支持冒泡)
Type: object
-
link
-
canvas mousemove 原生事件
Type: object
-
mouseenter
-
鼠标移入事件
Type: object
- Inherited From:
Properties:
Name Type Description instance
Instance 移入的对象
-
mouseleave
-
鼠标移出事件
Type: object
- Inherited From:
Properties:
Name Type Description instance
Instance 移入的对象
-
pressEnd
-
拖动后放置到 Instance 上的事件,由被拖动到的对象触发
Type: object
-
pressStart
-
开始拖动组的事件(特指lock的顶层组)
Type: object