Skip to content

Commit

Permalink
Merge pull request #4878 from systeminit/victor/fix-component-websock…
Browse files Browse the repository at this point in the history
…et-events

fix: Send the correct component size data on websocket events
  • Loading branch information
stack72 authored Oct 25, 2024
2 parents 3fe5222 + 638d16a commit ea1afdd
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions lib/sdf-server/src/service/diagram/set_component_position.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,25 @@ pub async fn set_component_position(
};

component
.set_geometry(&ctx, new_geometry.x, new_geometry.y, width, height)
.set_geometry(
&ctx,
new_geometry.x,
new_geometry.y,
width.clone(),
height.clone(),
)
.await?;
components.push(component);

geometry_list.push((id, update.geometry))
geometry_list.push((
id,
RawGeometry {
x: update.geometry.x,
y: update.geometry.y,
width,
height,
},
))
}

WsEvent::set_component_position(
Expand Down

0 comments on commit ea1afdd

Please sign in to comment.