跳转到内容

pivotick v3.0.0


拓展 / GraphRenderer

抽象接口: GraphRenderer ​

定义于:GraphRenderer.ts:75

方法 ​

clearEmphasis() ​

abstract clearEmphasis(): void

定义于:GraphRenderer.ts:123

返回值 ​

void


clearForecast() ​

abstract clearForecast(): void

定义于:GraphRenderer.ts:125

返回值 ​

void


clearHighlightedElements() ​

abstract clearHighlightedElements(): void

定义于:GraphRenderer.ts:121

返回值 ​

void


destroy() ​

destroy(): void

定义于:GraphRenderer.ts:150

在拆卸时释放渲染器拥有的资源(观察者、侦听器)。默认无操作;持有此类资源的渲染器会覆盖此内容。

返回值 ​

void


emphasiseElements() ​

abstract emphasiseElements(elements): void

定义于:GraphRenderer.ts:122

参数 ​

elements ​

(Node | Edge)[]

返回值 ​

void


enterNoteEditMode() ​

abstract enterNoteEditMode(note): void

定义于:GraphRenderer.ts:133

参数 ​

note ​

Note

返回值 ​

void


fitAndCenter() ​

abstract fitAndCenter(forceScale?): void

定义于:GraphRenderer.ts:115

参数 ​

forceScale? ​

number

返回值 ​

void


fitAndCenterWhenSettled() ​

fitAndCenterWhenSettled(forceScale?): Promise<void>

定义于:GraphRenderer.ts:141

内容停止调整大小后调整并居中。 sim 停止后在多个帧上布局的渲染器(例如扩展集群)会覆盖此设置以等待稳定的 bbox;默认值立即适合。应用拟合后即可解决。

参数 ​

forceScale? ​

number

返回值 ​

Promise<void>


focusElement() ​

abstract focusElement(element): void

定义于:GraphRenderer.ts:118

参数 ​

element ​

Node | Edge | Note

返回值 ​

void


getCanvas() ​

getCanvas(): HTMLElement

定义于:GraphRenderer.ts:152

返回值 ​

HTMLElement


getCanvasSelection() ​

abstract getCanvasSelection(): unknown

定义于:GraphRenderer.ts:111

返回值 ​

unknown


getClosestElementToCursor() ​

abstract getClosestElementToCursor(maxDistance?): Node | Edge | Note | null

定义于:GraphRenderer.ts:107

参数 ​

maxDistance? ​

number

返回值 ​

Node | Edge | Note | null


getContentBounds() ​

abstract getContentBounds(): GraphBounds | null

定义于:GraphRenderer.ts:116

返回值 ​

GraphBounds | null


getEdgeStyle() ​

abstract getEdgeStyle(edge): EdgeStyle

定义于:GraphRenderer.ts:99

参数 ​

edge ​

Edge

返回值 ​

EdgeStyle


getGraphInteraction() ​

abstract getGraphInteraction(): GraphInteractions<unknown>

定义于:GraphRenderer.ts:110

返回值 ​

GraphInteractions<unknown>


getNodeClosestToCursor() ​

abstract getNodeClosestToCursor(maxDistance?): Node | null

定义于:GraphRenderer.ts:108

参数 ​

maxDistance? ​

number

返回值 ​

Node | null


getNodeStyle() ​

abstract getNodeStyle(node, tier?): NodeStyle

定义于:GraphRenderer.ts:98

node 绘画风格。使用 tier 时,该绘图的样式而不是缩放选择的样式:-1 表示地板样式,或节点 tiers 的索引。

参数 ​

node ​

Node

tier? ​

number

返回值 ​

NodeStyle


getOptions() ​

abstract getOptions(): GraphRendererOptions

定义于:GraphRenderer.ts:100

返回值 ​

GraphRendererOptions


getRootContainer() ​

getRootContainer(): HTMLElement

定义于:GraphRenderer.ts:162

图表的根容器——一切,包括 chrome。故意与 getCanvas 区分开来:只要 chrome 打开(侧边栏、数据坞),画布就会收缩,而容器仅在其周围的页面变化时才会变化。任何不能对 Chrome 做出反应的东西都会对此进行测量。

返回值 ​

HTMLElement


getSelectionBox() ​

abstract getSelectionBox(): AbstractSelectionBox | null

定义于:GraphRenderer.ts:109

返回值 ​

AbstractSelectionBox | null


getShadowEdgeEnd() ​

getShadowEdgeEnd(): Point | null

定义于:GraphRenderer.ts:130

预览边缘结束的图形空间点,或未绘制时的 null。

返回值 ​

Point | null


getZoomBehavior() ​

abstract getZoomBehavior(): unknown

定义于:GraphRenderer.ts:103

返回值 ​

unknown


getZoomGroup() ​

abstract getZoomGroup(): HTMLElement | SVGElement | null

定义于:GraphRenderer.ts:112

返回值 ​

HTMLElement | SVGElement | null


graphToScreenCoordinates() ​

abstract graphToScreenCoordinates(graphX, graphY): Point

定义于:GraphRenderer.ts:105

参数 ​

graphX ​

number

graphY ​

number

返回值 ​

Point


hideShadowEdge() ​

abstract hideShadowEdge(): void

定义于:GraphRenderer.ts:127

返回值 ​

void


highlightElement() ​

abstract highlightElement(element): void

定义于:GraphRenderer.ts:119

参数 ​

element ​

Node | Edge

返回值 ​

void


init() ​

abstract init(): void

定义于:GraphRenderer.ts:92

返回值 ​

void


nextTick() ​

abstract nextTick(): void

定义于:GraphRenderer.ts:101

返回值 ​

void


nextTickFor() ​

abstract nextTickFor(nodes): void

定义于:GraphRenderer.ts:102

参数 ​

nodes ​

Node[]

返回值 ​

void


screenToGraphCoordinates() ​

abstract screenToGraphCoordinates(screenX, screenY): Point

定义于:GraphRenderer.ts:104

参数 ​

screenX ​

number

screenY ​

number

返回值 ​

Point


setupRendering() ​

setupRendering(): void

定义于:GraphRenderer.ts:197

返回值 ​

void


setViewport() ​

abstract setViewport(target): void

定义于:GraphRenderer.ts:117

参数 ​

target ​

ViewportTarget

返回值 ​

void


showForecast() ​

abstract showForecast(forecast): void

定义于:GraphRenderer.ts:124

参数 ​

forecast ​

GraphForecast

返回值 ​

void


showShadowEdge() ​

abstract showShadowEdge(params): void

定义于:GraphRenderer.ts:126

参数 ​

params ​
invalid? ​

boolean

source ​

Node | Note

targetNode? ​

Node

targetPosition? ​

{ x: number; y: number; }

targetPosition.x ​

number

targetPosition.y ​

number

返回值 ​

void


toggleLassoMode() ​

abstract toggleLassoMode(enabled): void

定义于:GraphRenderer.ts:106

参数 ​

enabled ​

boolean

返回值 ​

void


unHighlightElement() ​

abstract unHighlightElement(element): void

定义于:GraphRenderer.ts:120

参数 ​

element ​

Node | Edge

返回值 ​

void


update() ​

abstract update(dataChanged): void

定义于:GraphRenderer.ts:93

参数 ​

dataChanged ​

boolean

返回值 ​

void


updateLayoutProgress() ​

updateLayoutProgress(progress, elapsedTime, progressType): void

定义于:GraphRenderer.ts:166

参数 ​

progress ​

number

elapsedTime ​

number

progressType ​

ProgressType

返回值 ​

void


zoomIn() ​

abstract zoomIn(): void

定义于:GraphRenderer.ts:113

返回值 ​

void


zoomOut() ​

abstract zoomOut(): void

定义于:GraphRenderer.ts:114

返回值 ​

void