跳到主要内容

CellManager 概述

DHTMLX Diagram 库为您提供了一组 API,用于动态操作 swimlane 及其单元格。该 API 既可以在 diagram 中使用,也可以在编辑器中使用。

方法

名称描述
add()将单元格作为行或列添加到 swimlane 中
getCellId()按索引返回 swimlane 中单元格的 id
getCellIndex()根据 id 返回 swimlane 中单元格的索引
getSubHeaderCellId()根据子表头的 id 返回 swimlane 中单元格的 id
getSubHeaderCellIndex()根据子表头的 id 返回 swimlane 中单元格的索引
getSubHeaderType()根据 id 返回 swimlane 子表头的类型
move()将 swimlane 的单元格作为行或列移动
remove()将 swimlane 的单元格作为行或列移除
resetSwimlane()重置活动 swimlane
setSwimlane()设置活动 swimlane,以便后续对其进行操作
validation()根据方向和操作类型验证 swimlane 的单元格

Events

名称描述
afterCellsAdd在向 swimlane 添加新单元格后触发
afterCellsMove在 swimlane 的单元格被移动后触发
afterCellsRemove在 swimlane 的单元格被移除后触发
afterCellsValidation在 swimlane 的单元格完成验证后触发
beforeCellsAdd在向 swimlane 添加新单元格之前触发
beforeCellsMove在 swimlane 的单元格被移动之前触发
beforeCellsRemove在 swimlane 的单元格被删除之前触发
beforeCellsValidation在 swimlane 的单元格被验证之前触发