antvis/G6

[v5] When do undo/redo, node position is updated incorrectly #5690

hongwei0417 posted onGitHub

Describe the bug

The node position only be updated to old y-axis position, when do undo/redo.

Arc_wskPjjOkVR

I found a bug in item-data-command from 5.0.0-beta.28 which the data doesnt have nodeId. https://github.com/antvis/G6/blob/9b20b27d9ddcd942399ad638dd6a8e22168cdaa7/packages/g6/src/stdlib/plugin/history/item-data-command.ts#L69C41-L69C47

Your Example Website or App

https://g6-next.antv.antgroup.com/examples/tool/history#history

Steps to Reproduce the Bug or Issue

  1. Move the node to random position
  2. Call undo api
  3. The node position is only be updated to old y-axis position

Expected behavior

The node position need to be updated both of x-axis and y-axis.

Screenshots or Videos

No response

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Version: [e.g. 91.1]

Additional context

No response


We greatly appreciate your feedback. It's important to note that G6 has seen substantial evolution since the beta 28 version. With this in mind, we encourage you to upgrade to the latest release (beta.35) to take advantage of these advancements. Please be aware that this update entails modifications to how G6 is utilized, and we are actively enhancing the accompanying documentation to aid in your transition.

In the interim, for guidance on writing your code, you may refer to our test cases. We're committed to providing you with the necessary resources and support as we roll out these improvements.

posted by Aarebecca 12 months ago

You can try the latest version and the above issues should have been fixed

posted by Aarebecca 9 months ago

Fund this Issue

$0.00
Funded

Pull requests