Skip to content

Wrong SVG element during node rendering #336

@correnson

Description

@correnson

I encountered a mysterious bug when rendering node shapes. Sometimes, after a DOT model update, few nodes (0, 1 or 2 as far as I observed) have a mismatched SVG element, typically 'ellipse' instead if 'polygon', the other attributes being exactly the expected ones. The problem seams to only occurs only when tweenShapes is ON.

The bug occurs deterministically, but depends on the history of DOT model changes. If I go from model A to model B, the mismatch occurs in B, but if I go from B to A, the mismatch occurs in A.

Context is Electron + React on macOS ; the problem occurs with various versions of the stack.

All models leads to correct PNG from dot command line.

Inspection of SVG elements in the browser (Chromium) using the developper tools reveals the problem.
Modifying the SVG element, eg. from ellipsis to polygon does not work although all other attributes seams to be OK.
Inserting by hand a similar element and copy the attributes from the wrong element fixes the problem.

On the following screenshot, the mismatch is 'ellipsis' instead of 'polygon':

Image

With another history of updates I obtain this correct diagram, but another one is wrong:

Image

Here, the mismatch is 'polygon' instead of 'ellipsis':

Image

I'd like to make a minimal example to reproduce the problem, although it would require a bunch of work on my side.

The current workaround I use is to turn shape tweening OFF.

Otherwise, the component performs great job !

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions