Group rotation doesn't works
Group rotation via rotation handle does not rotate the group and its children.
When multiple elements are grouped and the rotation handle is used on the group, the rotation is not applied to the group nor to the nested elements. The interaction completes without committing the rotation.
No rotation is committed on mouse release: the group and its nested elements remain unrotated (or rotate around an incorrect pivot during drag but revert/are not applied on release).
To Reproduce
Steps to reproduce the behavior:
- Group several elements.
- Press and hold the right mouse button on the group’s rotation handle.
- Move the cursor to rotate the group.
- Release the right mouse button.
If possible provide a repository to reproduce the issue. At minimum, provide the code (in text form, no image) that produces the issue.
Expected behavior
The group rotates around the correct pivot, and all nested elements rotate together with the group.
Screenshots
Environment
maxGraph version: 0.21.0
- Desktop
- OS and version: Windows 11
- Browser and version: [e.g. chrome 141]
- Used frameworks: Angular v16.2
Additional context
Graph configuration:
VertexHandlerConfig.rotationEnabled = true;
VertexHandlerConfig.cursorMovable = 'move';
EdgeHandlerConfig.virtualBendsEnabled = true;
graph.setCellsBendable(true);
graph.setPanning(true);
graph.setHtmlLabels(true);
graph.setGridEnabled(true);
graph.setGridSize(10);
graph.setPanning(true);
graph.setAllowDanglingEdges(true);
graph.resetEdgesOnConnect = false;
graph.setRecursiveResize(true);
graph.setConstrainRelativeChildren(true);
groupCells method:
if (!graph) return;
const selectedCells = graph.getSelectionCells();
try {
graph.getDataModel().beginUpdate();
const cells = graph.getCellsForGroup(selectedCells);
console.log(cells);
if (cells.length > 1) {
graph.createGroupCell;
const group = graph.groupCells(null as any, 0, cells);
graph.setCellStyle(
{
...group.style,
shape: 'rectangle',
fillColor: 'none',
strokeColor: 'none',
rotatable: true,
resizable: true,
},
[group]
);
graph.setSelectionCell(group);
}
} finally {
graph.getDataModel().endUpdate();
}
Group rotation doesn't works
Group rotation via rotation handle does not rotate the group and its children.
When multiple elements are grouped and the rotation handle is used on the group, the rotation is not applied to the group nor to the nested elements. The interaction completes without committing the rotation.
No rotation is committed on mouse release: the group and its nested elements remain unrotated (or rotate around an incorrect pivot during drag but revert/are not applied on release).
To Reproduce
Steps to reproduce the behavior:
If possible provide a repository to reproduce the issue. At minimum, provide the code (in text form, no image) that produces the issue.
Expected behavior
The group rotates around the correct pivot, and all nested elements rotate together with the group.
Screenshots
Environment
maxGraphversion: 0.21.0Additional context
Graph configuration:
groupCells method: