xwikisas / application-diagram

Create various types of diagrams using draw.io
GNU Lesser General Public License v2.1
0 stars 8 forks source link

Diagram saves only the current page in attachments when multiple pages are used #261

Open oanalavinia opened 5 months ago

oanalavinia commented 5 months ago

Steps to reproduce:

  1. Create a diagram with multiple pages
  2. Save the diagram while being on the second page
  3. Observe the attachments

Actual result: The 2 attachments (png and svg) are for the page where this diagram was saved, which in this case is the second. This will affect the short preview displayed when first opening the diagram. Also, the diagram macro is affected. When the macro is used with the cached option set to true, it will use the attachments from the diagram, which display only the second diagram

https://github.com/xwikisas/application-diagram/assets/22794181/150c90ad-c7ff-43d4-8b4a-8cbb2d28ffef

Expected result: For the short preview displayed on the diagram page, the first page should be used. For the diagram macro, when used with the cached option, I would expect for it to display the first page by default and have an option to specify another page if I want

Probably this can be seen as a limitation and simply add a suggestion to use the non-cached diagram when there are multiple pages, but still not nice.