HTMLSelectionFrameList
HTMLSelectionFrameList
is a collection of HTML 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 HTMLSelectionFrameList(options?: HTMLSelectionFrameList.Options)
It implements all the options from the OverlaySelectionFrameList and adds the following options:
styleβ
style?: ItemStyle;
[optional] CSS styles 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 HTMLSelectionFrameList({
style: {
border: '2px solid black',
borderRadius: '5px',
}
});
Typesβ
The following types are used in the HTMLSelectionFrameList
API:
ItemStyleβ
type ItemStyle =
Partial<CSSStyleDeclaration> |
((cell: dia.Cell, frameList: HTMLSelectionFrameList) => Partial<CSSStyleDeclaration>);
Optionsβ
interface Options extends OverlaySelectionFrameList.Options {
style?: ItemStyle;
};