Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Canvas reverts to small view area on save #1041

Open
jgadsden opened this issue Jul 29, 2024 · 3 comments
Open

Canvas reverts to small view area on save #1041

jgadsden opened this issue Jul 29, 2024 · 3 comments
Labels
bug Something isn't working priority version-2.4
Milestone

Comments

@jgadsden
Copy link
Collaborator

jgadsden commented Jul 29, 2024

Describe the bug:
When a diagram is saved, Antv/X6 drawing package reverts the canvas size to the size of the container view
The user is left with a confusing diagram and has to drag components to get them back into view
Updating to antv/x6 version 2.x did not solve this, see #722

Expected behaviour:
when opening a diagram, the canvas size and viewing area should match the previous sizes

Environment:

  • Version: after commit 6b8f3e3
  • Platform: both Web App and Desktop App
  • OS: all of MacOS / Windows / Linux
  • Browser: all of chrome, firefox, safari

To Reproduce:

  1. Open the example diagram
  2. drag a component so that the diagram canvas resizes
  3. save the diagram
  4. only a portion of the canvas is now displayed

Any additional context, screenshots, etc:

Create a model that spans more than one page vertically, note that this diagram is zoomed out to show the complete example model:

Screenshot 2024-10-28 at 05 40 21

press the save button and observer that only the top page is displayed in the diagram view:

Screenshot 2024-10-28 at 05 40 41

The model is still complete, zoom in and out to reframe the diagram

@jgadsden jgadsden added bug Something isn't working blocker Functionality isn't working priority version-2.3 labels Jul 29, 2024
@jgadsden jgadsden added this to the Version 2.3 milestone Jul 29, 2024
@MohSaqlainn
Copy link

@jgadsden I do not get this point.

Because on my side, when I save the file, it does not revert the canvas size...

Are you saying that when he saves the file in a JSON file and then opens this JSON file again, it reverts the canvas size to the size of the container view? can you elaborate on this more?

@jgadsden
Copy link
Collaborator Author

jgadsden commented Sep 30, 2024

the problem is to do with the dependencies for the version of antv/x6 that we are using : v1.35.0 or v1.35.1

I am not sure which dependency it is but we can take the v2.2.0 tag, which works, and update the dependencies which then produce the fault:

npm run clean
rm td.vue/package-lock.json
git status
npm i
grep -n2 "antv" td.vue/package-lock.json
npm run start:desktop

this means we have to update antv/x6 to version 2.x, subject of issue #722

@jgadsden jgadsden added version-2.4 and removed blocker Functionality isn't working version-2.3 AntV/X6 labels Oct 28, 2024
@jgadsden
Copy link
Collaborator Author

moving this to version 2.4
it seems to be an incompatibility with antv/x6 and Vue 2
Vue is due to be migrated to away from 2.x to version 3.5.x, subject of issue #444

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working priority version-2.4
Projects
None yet
Development

No branches or pull requests

2 participants