graphview: set the node position

This position will be used by the
the graph saver
This commit is contained in:
Stéphane Cerveau 2024-09-09 14:30:29 +02:00
parent c309e94db2
commit 37f04b681f

View file

@ -1400,6 +1400,7 @@ impl GraphView {
let node = nodes
.get_mut(&widget.id())
.expect("Node is not on the graph");
node.0.set_position(point.x(), point.y());
node.1 = graphene::Point::new(
point.x().clamp(
-(CANVAS_SIZE / 2.0) as f32,