[x] I documented the TypeScript code using JSDoc style. (NA)
[x] I added multiple screenshots/screencasts of my UI changes (NA)
[x] I translated all the newly inserted strings into German and English (NA)
Motivation and Context
In Apollon, elements are centered, and their positions rounded to grids, when importing and exporting diagrams, and when diagrams are saved in any other storage (including local storage). This means what users see and what the actual diagram data are differ. For example the user might put two elements close to each other, but as a result of centering and rounding, they are not in fact as close as the user intends.
These issues specifically become highlighted in realtime collaboration. Patches emitted by Apollon need to be with respect to storable diagram data, as there are typically peers in a realtime collaboration network whose sole responsibility is to store the diagram, which would need to update the diagram accordingly matching the stored / exported format. Subsequently, when a user moves an element, in the perspective of realtime collaboration, all other elements are moved to. Or if a user refreshes their client, they will re-import the diagram with different coordinates than peers who have not refreshed, causing the clients to desync.
Description
This change removes aforementioned centering and rounding logic, and updates necessary test fixtures. Centering is important for SVG exports as they should not have empty spaces, but this is already fixed with previous fixes to SVG export bounding calculations.
Steps for Testing
Run the client,
Create elements and move them to some corner,
Save the state, or export the diagram,
Reload the state (refresh), or import the diagram,
Elements remain exactly in the position they were saved / exported in.
Checklist
I documented the TypeScript code using JSDoc style.(NA)I added multiple screenshots/screencasts of my UI changes(NA)I translated all the newly inserted strings into German and English(NA)Motivation and Context
In Apollon, elements are centered, and their positions rounded to grids, when importing and exporting diagrams, and when diagrams are saved in any other storage (including local storage). This means what users see and what the actual diagram data are differ. For example the user might put two elements close to each other, but as a result of centering and rounding, they are not in fact as close as the user intends.
These issues specifically become highlighted in realtime collaboration. Patches emitted by Apollon need to be with respect to storable diagram data, as there are typically peers in a realtime collaboration network whose sole responsibility is to store the diagram, which would need to update the diagram accordingly matching the stored / exported format. Subsequently, when a user moves an element, in the perspective of realtime collaboration, all other elements are moved to. Or if a user refreshes their client, they will re-import the diagram with different coordinates than peers who have not refreshed, causing the clients to desync.
Description
This change removes aforementioned centering and rounding logic, and updates necessary test fixtures. Centering is important for SVG exports as they should not have empty spaces, but this is already fixed with previous fixes to SVG export bounding calculations.
Steps for Testing
Test Coverage