Skip to main content
Version: 4.1

SVGSelectionFrameList

SVGSelectionFrameList is a collection of SVG Rectangular frames around cells to be used with Selection.

It extends the OverlaySelectionFrameList.

To read more about selection frames and how to use them, see the selection tutorial.

constructor​

new SVGSelectionFrameList(options?: SVGSelectionFrameList.Options)

It implements all the options from the OverlaySelectionFrameList and adds the following options:

attributes​

attributes?: ItemAttributes;

[optional] SVG attributes to be set on the selection frames.

It's either a plain object or a function that returns a plain object. The function is called with the cell and the frameList as arguments.

const frameList = new SVGSelectionFrameList({
attributes: {
fill: 'none',
stroke: 'black',
strokeWidth: 2,
}
});

layer​

layer?: dia.Paper.Layer;

[optional] The stacking context of selection frames.

'back'Render the frames behind all the cells.
'front'Render the frames in front of all the cells. (default)
const frameList = new SVGSelectionFrameList({
layer: dia.Paper.Layer.BACK,
});

Types​

The following types are used in the SVGSelectionFrameList API:

ItemAttributes​

type ItemAttributes =
dia.SVGAttributes |
((cell: dia.Cell, frameList: SVGSelectionFrameList) => dia.SVGAttributes);

Options​

interface Options extends OverlaySelectionFrameList.Options {
layer?: dia.Paper.Layers;
attributes?: ItemAttributes;
}

Stay in the know

Be where thousands of diagramming enthusiasts meet

Star us on GitHub