let nodes = [{
id: "rectangle1",
offsetX: 100,
offsetY: 100,
width: 100,
height: 100,
annotations: [{
content: 'rectangle1'
}]
}, {
id: "rectangle2",
offsetX: 200,
offsetY: 200,
width: 100,
height: 100,
//remove drag constraints
constraints: NodeConstraints.Default & ~NodeConstraints.Drag,
annotations: [{
content: 'rectangle2'
}]
},
//create group element
{
id: 'group2',
children: ['rectangle1', 'rectangle2']
}
]; |
<SymbolPaletteComponent id="symbolpalette" expandMode="Multiple" allowDrag={false}/> |