Skip to main content

Diagram methods overview

NameDescription
addShape()Creates a custom shape and sets sidebar options for its editing in the right panel of the editor
autoPlace()Automatically arranges connected diagram shapes in the hierarchical structure
collapseItem()Hides all children of the target shape or collapses the group/swimlane
destructor()Removes a diagram instance and releases occupied resources
expandItem()Shows all children of the target shape or expands the group/swimlane
getScrollState()Returns the position of the diagram inner scroll
locate()Gets the ID of an item from the specified HTML event or tag
paint()Repaints the diagram
scrollTo()Sets the inner scroll of the diagram to the specified position
showItem()Adjusts scroll to make the target item visible