You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This might not be a problem but rather a misunderstanding of functionality on my part. My intention is as follows:
This could be a somewhat unusual requirement. I am developing a node orchestration feature for a large-screen project. The canvas's parent container has a resolution of 6000x4000, which is quite high. After testing, I found that a resolution of 3000x2000 offers the best display effect. So, I set the canvas attribute size to 3000x2000. However, at this point, the canvas cannot fill the parent container. I further adjusted the canvas's CSS style size to 6000x4000 (I tried both directly specifying the CSS and scaling through CSS transform). Finally, I achieved the desired result. But now, I can no longer click on nodes to select them.
I suspect this approach may have introduced issues with coordinate transformation. However, what puzzles me is that in the demo provided in the project, the canvas attribute size and style size are also inconsistent, yet it doesn't experience any problems. Moreover, the right-click menu seems unaffected by the style size. No matter how I scale the style size, the rendering size of the right-click menu always remains consistent.
So, how can I achieve an effect similar to the demo? That is, by having inconsistent canvas attribute size and style size to obtain a suitable display effect, while also maintaining an appropriate rendering size for the right-click menu.
The text was updated successfully, but these errors were encountered:
This might not be a problem but rather a misunderstanding of functionality on my part. My intention is as follows:
This could be a somewhat unusual requirement. I am developing a node orchestration feature for a large-screen project. The canvas's parent container has a resolution of 6000x4000, which is quite high. After testing, I found that a resolution of 3000x2000 offers the best display effect. So, I set the canvas attribute size to 3000x2000. However, at this point, the canvas cannot fill the parent container. I further adjusted the canvas's CSS style size to 6000x4000 (I tried both directly specifying the CSS and scaling through CSS transform). Finally, I achieved the desired result. But now, I can no longer click on nodes to select them.
My code under the vue2 is like this
I suspect this approach may have introduced issues with coordinate transformation. However, what puzzles me is that in the demo provided in the project, the canvas attribute size and style size are also inconsistent, yet it doesn't experience any problems. Moreover, the right-click menu seems unaffected by the style size. No matter how I scale the style size, the rendering size of the right-click menu always remains consistent.
So, how can I achieve an effect similar to the demo? That is, by having inconsistent canvas attribute size and style size to obtain a suitable display effect, while also maintaining an appropriate rendering size for the right-click menu.
The text was updated successfully, but these errors were encountered: