X6 icon indicating copy to clipboard operation
X6 copied to clipboard

preserveAspectRatio is not taking effect until the node is reselected

Open georgezhu08 opened this issue 3 years ago • 1 comments

问题描述

During a node's resizing, changing graph.options.resizing.preserveAspectRatio will not work immediately until the node being resizing is deselected and then reselected.

重现链接

https://codesandbox.io/s/flamboyant-montalcini-j7nc0w?file=/src/App.tsx

重现步骤

  1. Open the sandbox URL
  2. Try resizing the node, with and without preserveAspectRatio enabled
  3. The change is not taking effect immediately, the node must be deselected and then reselected to make the change work as expected.

预期行为

The preserveAspectRatio option change is expected to take effect immediately. During a graph editing, it's pretty usual to press and hold Shift (or other modifier) temporarily to keep the aspect ratio while resizing, this is common sense.

平台

  • 操作系统: macOS
  • 网页浏览器: Google Chrome
  • X6 版本: 1.31

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

georgezhu08 avatar Mar 27 '22 15:03 georgezhu08

👋 @georgezhu08

Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.

To help make it easier for us to investigate your issue, please follow the contributing guidelines.

We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

x6-bot[bot] avatar Mar 27 '22 15:03 x6-bot[bot]