blockly > blockRendering > 渲染程序 > getConnectionPreviewMethod
blockRendering.Renderer.getConnectionPreviewMethod() 方法
v10 - 不再支持此函数。自定义 IConnectionPreviewer 或许能够实现该功能。
根据可用的连接、当前拖动的连接以及正在拖动的块选择连接预览方法。
Signature:
getConnectionPreviewMethod(closest: RenderedConnection, local: RenderedConnection, topBlock: BlockSvg): PreviewType;
参数
参数 | 类型 | 说明 |
---|---|---|
最近 | RenderedConnection | 可用的连接。 |
local | RenderedConnection | 当前正在拖动的连接。 |
topBlock | BlockSvg | 当前正在拖动的块。 |
返回:
PreviewType
要显示的预览类型。