Class: Rectangle

Rectangle


new Rectangle(configs)

矩形单元

Parameters:
Name Type Description
configs Rectangle~RectangleConfigs

Extends

Members


absolutePosition :Node~AbsolutePosition

Type:
Inherited From:

anchor :Array.<number>

Type:
  • Array.<number>
Inherited From:

border :Rectangle~borders

边框设置,优先级高于 borderWidth,borderColor

Type:

borderRadius :Number

圆角矩形半径

Type:
  • Number

height :Number

Type:
  • Number

width :Number

Type:
  • Number

Methods


clone()

克隆当前节点.

Inherited From:
Returns:

当前节点的副本

Type
Node

Type Definitions


border

Type:
  • object
Properties:
Name Type Description
borderColor number

边框宽度, 默认 0

borderWidth number

边框颜色, 默认 transparent


borders

Type:
  • object
Properties:
Name Type Description
top Rectangle~border

上边框

right Rectangle~border

右边框

bottom Rectangle~border

下边框

left Rectangle~border

左边框


RectangleConfigs

矩形单元 配置

Type:
Properties:
Name Type Description
width number

height number

borderRadius number

圆角矩形半径

borderColor string

边框颜色, 默认 transparent

borderWidth string

边框宽度, 默认 0

border Rectangle~borders

边框设置

Events


afterResolveMovingTarget

开始拖拽时,拖拽对象设置之前

Type: object
Properties:
Name Type Description
event Event

原始事件

jflow JFlow

当前JFlow对象

target Node

目标节点

Inherited From:

drop

丢在节点上事件

Type: object
Properties:
Name Type Description
event Event

原始事件

instance Object

拖动的对象

jflow JFlow

当前JFlow对象

target Node

目标节点

point Array.<number>

已经计算到绘图栈对应坐标系下的坐标

Inherited From:

instancemousemove

instance mousemove 原生事件,仅在无拖拽时触发

Type: object
Properties:
Name Type Description
event Event

原始事件

instance Node

原始事件

jflow JFlow

当前JFlow对象

Inherited From:

instancePressStart

开始拖动对象事件(就是目标对象的拖动事件,事件支持冒泡)

Type: object
Properties:
Name Type Description
event Event

原始事件

instance Node

拖动的对象

jflow JFlow

当前JFlow对象

bubbles Boolean

冒泡

Inherited From:

canvas mousemove 原生事件

Type: object
Properties:
Name Type Description
event Event

原始事件

target Node

原始事件

payload object

传入的消息

jflow JFlow

当前JFlow对象 - 当前JFlow对象

Inherited From:

pressEnd

拖动后放置到 Instance 上的事件,由被拖动到的对象触发

Type: object
Properties:
Name Type Description
event Event

原始事件

instance Node

拖动的对象

jflow JFlow

当前JFlow对象

target Instance

拖动到的对象

bubbles boolean

冒泡

Inherited From:

pressStart

开始拖动组的事件(特指lock的顶层组)

Type: object
Properties:
Name Type Description
event Event

原始事件

instance Node

拖动的对象

jflow JFlow

当前JFlow对象

Inherited From: