Class: EndpointSegment
端点:表示连接到Node或Link的某一个线段上
js
import {EndpointSegment} from '@jtopo/core';
// 示例
let endpoint = new EndpointSegment(link2, 0.5, 0);
link.setBegin(endpoint);
Hierarchy
↳
EndpointSegment
Table of contents
Constructors
Properties
Methods
Constructors
constructor
new EndpointSegment(target
, t
, segIndex?
)
Parameters
Name | Type | Default value |
---|---|---|
target | DisplayObject | undefined |
t | number | undefined |
segIndex | number | 0 |
Overrides
Properties
className
className: string
Overrides
segIndex
segIndex: number
t
t: number
target
target: DisplayObject
被连接的对象
Overrides
Methods
hasTarget
hasTarget(): boolean
Returns
boolean
Inherited from
isDisplayObjectTarget
isDisplayObjectTarget(): boolean
Returns
boolean
Inherited from
Endpoint.isDisplayObjectTarget
isNodeTarget
isNodeTarget(): any
Returns
any
Inherited from
toJSON
toJSON(objIndexMap?
): any
Parameters
Name | Type |
---|---|
objIndexMap? | Map <DisplayObject , number > |
Returns
any
Inherited from
fromJSON
Static
fromJSON(json
, objIndexMap?
): any
Parameters
Name | Type |
---|---|
json | any |
objIndexMap? | Object |
Returns
any