Skip to content

Commit

Permalink
[Fix #527] Fixed the issue that prevented events with non-integer pos…
Browse files Browse the repository at this point in the history
…itions from being persisted.
  • Loading branch information
LaChope committed Sep 27, 2024
1 parent 12ba324 commit f9b2c23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/editor/faultTree/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ const Editor = () => {
const rect: Rectangle = movedEvent.rectangle;

if (rect.x != position.x || rect.y != position.y || rect.width != size.width || rect.height != size.height) {
rect.x = position.x;
rect.y = position.y;
rect.x = Math.round(position.x);
rect.y = Math.round(position.y); // The server only supports integers
rect.width = size.width;
rect.height = size.height;

Expand Down

0 comments on commit f9b2c23

Please sign in to comment.