Sets or toggles the flag bit for the given key in the cell's styles. If the value parameter is not set, then the flag is toggled.

Example that toggles the bold font style:

const cells = graph.getSelectionCells();
setCellStyleFlags(graph.model,
cells,
'fontStyle',
constants.FONT.BOLD);
  • Parameters

    • model: GraphDataModel

      that contains the cells.

    • cells: Cell[]

      Array of Cells to change the style for.

    • key: NumericCellStateStyleKeys

      Key of the style to be changed.

    • flag: number

      Integer for the bit to be changed.

    • Optionalvalue: boolean

      Optional boolean value for the flag.

    Returns void