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 are not well saved when contains an Actor shape #160

Closed CamiAndrei closed 4 years ago

CamiAndrei commented 4 years ago

Steps to reproduce this issue:

TypeError: rectangles[(rectangles.length - 1)] is undefined DiagramEditSheet:604:27



![Screenshot from 2020-06-15 15-11-46](https://user-images.githubusercontent.com/12369283/84679506-0e3c0580-af3a-11ea-85dd-adb8dddc00c6.png)

 * Click Save. The Save button it's gray-out too.
 * Click Preview
 * Then Save&View from preview.
 * Go to the page where it was inserted 
 Only a link to the diagram is displayed. The diagram is not displayed.
 * Remove the "Actor" shape
  The diagram is displayed in the page where it was inserted.

![Screenshot from 2020-06-15 18-26-41](https://user-images.githubusercontent.com/12369283/84679969-a89c4900-af3a-11ea-81d9-63dc5f569c56.png)

 Also the diagram are not updated anymore in the pages where they were inserted, if at some point an Actor shape was added in it. 
* Add an Actor shape to an existing diagram 
* Click Save&View
 Save&View it's grayed out and the page is not saved
* Click Save. The Save button it's gray-out too.
 * Click Preview
 * Then Save&View from preview.
 * Go to the page where it was inserted 
The changes made in the diagram are not updated in the inserted page.
oanalavinia commented 4 years ago

This issue is duplicated to #144 , and as is explained in the comment https://github.com/xwikisas/application-diagram/issues/144#issuecomment-625782063 the issue is resumed to the problem that if the text is not inserted in a squared shape the diagram cannot be saved. I have updated the description to specify that it includes Actor shapes as well