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;
}