-
Notifications
You must be signed in to change notification settings - Fork 198
Description
The Bug
The resizing outline overlay is rendered outside of the SVG canvas when resizing a basic shape and is not displayed. I've ruled out my setup because it also happens on the demos.
To Reproduce
Steps to reproduce the behaviour:
- Using the https://maxgraph.github.io/maxGraph/demo/?path=/story/toolbars-dynamictoolbar--default example.
- Drag a Rectangle onto the canvas.
- Select the rectangle and grab one of the Handles.
- When dragging the handle, there is no outline indicating the target size of the shape.
The issue is manifesting itself at the condition on line 691 of VertexHandler.ts
maxGraph/packages/core/src/view/handler/VertexHandler.ts
Lines 691 to 697 in 22d8a34
| if ( | |
| !( | |
| Client.IS_SVG && | |
| (this.state.style.rotation ?? 0) != 0 && | |
| this.state.text != null && | |
| this.state.text.node.parentNode === this.graph.container | |
| ) |
I'm unsure if the issue is with the condition or the rendering, i.e. the Rubber Band highlighter is rendered outside the canvas in its own divider. If this overlay is supposed to do the same, the divider and SVG canvas are missing.
If it is supposed to be in the overlay on the canvas itself, then the condition has a problem.
Expected behavior
A green dashed outline, indicating the target size of the shape, is expected.
Screenshots
This screenshot shows the rendered box. Making the div container an SVG, shows the overlay working as expected.

Environment
maxGraphversion or commit: 0.15.0- Desktop
- OS and version: Windows 11 Pro - 24H2
- Browser and version: Chromium: 126.0.6478.61
- Node/npm version: Node 23.6.1, npm 10.9.2
- Used frameworks: Electron-vite/React/Typescript