Skip to main content

Home > @jsplumbtoolkit/browser-ui > Surface > setVisible

Surface.setVisible() method#

Sets the visible state of some model object or group of model objects. If the object is a vertex, the visible state will be applied to all edges connected to the given vertex.

By default this method will, for groups and nodes, cascade down to any nested vertices.


setVisible(obj: FilterableDataset | ArrayLike<any> | Base, state: boolean, doNotCascade?: boolean): void;


objFilterableDataset | ArrayLike<any> | BaseEdge, Group, Node or Port, and array of these, or a FilterableDataset, such as a Selection.
statebooleanTrue if edges should be visible, false otherwise.
doNotCascadebooleanDefaults to false. If true, don't cascade down to any nested vertices.