Skip to content

The levels of nodes inside a scope is not updated when dragging the scope into a larger scope #144

@li-xin-yi

Description

@li-xin-yi

Bug reproduce:

image

  1. create a code 1 and scope 1 individually on the canvas.
  2. drag code 1 into the scope 1. By now, everything works well.
  3. create a larger scope 2, drag scope 1 into scope 2

Now, the level of code 1 and scope 1 are the same. To compare that clearly, create a code 2 and drag it into scope 1, see their background colors in the minimap, which are supposed to be the same as their parents are scope 1.

Solution

Therefore, I propose to update node.level in a pre-order DFS way to ensure all involved descendant nodes are in correct levels, or the rendering order and background colors are incorrect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions