Skip to content

Commit

Permalink
fix: set snapToGrid to false by default (#3066)
Browse files Browse the repository at this point in the history
  • Loading branch information
NewByVector authored Dec 19, 2022
1 parent 8b14594 commit e2bb71d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/x6/src/registry/router/manhattan/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export const defaults: ManhattanRouterOptions = {

fallbackRouter: orth,
draggingRouter: null,
snapToGrid: true,
snapToGrid: false,
}

export function resolve<T>(
Expand Down
2 changes: 1 addition & 1 deletion packages/x6/src/view/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,6 @@ export class NodeView<
) {
this.graph.model.startBatch('add-edge')
const edgeView = this.createEdgeFromMagnet(magnet, x, y)
edgeView.notifyMouseDown(e, x, y) // backwards compatibility events
edgeView.setEventData(
e,
edgeView.prepareArrowheadDragging('target', {
Expand All @@ -858,6 +857,7 @@ export class NodeView<
}),
)
this.setEventData<Partial<EventData.Magnet>>(e, { edgeView })
edgeView.notifyMouseDown(e, x, y)
}

protected getDefaultEdge(sourceView: CellView, sourceMagnet: Element) {
Expand Down

0 comments on commit e2bb71d

Please sign in to comment.