Skip to content

Commit

Permalink
fix: paste path by contextmenu wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
F-star committed Mar 8, 2024
1 parent 29afd94 commit 8c46026
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/core/src/graphs/graph/graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,11 @@ export class Graph<ATTRS extends GraphAttrs = GraphAttrs> {

static dMove(graphs: Graph[], dx: number, dy: number) {
for (const graph of graphs) {
graph.attrs.x += dx;
graph.attrs.y += dy;
const bbox = graph.getBBox();
graph.updateAttrs({
x: bbox.x + dx,
y: bbox.y + dy,
});
}
}

Expand Down

0 comments on commit 8c46026

Please sign in to comment.