Skip to main content

afterExpand

fires after an item has been expanded

afterExpand: (id: Id, dir?: TreeDirection) => void;

Parameters:

  • id: string | number - the id of an item which has been expanded
  • dir: string - optional, the side the children were shown in relation to the parent shape ("left" or "right" for type:"topic", otherwise - undefined)

Example

diagram.events.on("afterExpand", function(id, dir) {
console.log(diagram.data.getItem(id).text + " was expanded", dir);
});

Change log:

The dir parameter has been added in v3.1.