Skip to content

[BUG] Resize outline overlay is not displayed #666

@sandy-loconoco

Description

@sandy-loconoco

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:

  1. Using the https://maxgraph.github.io/maxGraph/demo/?path=/story/toolbars-dynamictoolbar--default example.
  2. Drag a Rectangle onto the canvas.
  3. Select the rectangle and grab one of the Handles.
  4. 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

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.
Image

Environment

  • maxGraph version 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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions