feat(core): add autoPanSpeed prop (#1535)
* feat(core): add `autoPanSpeed` prop * chore(changeset): add
This commit is contained in:
@@ -46,6 +46,7 @@ export function useDrag(params: UseDragParams) {
|
||||
nodeDragThreshold,
|
||||
viewport,
|
||||
autoPanOnNodeDrag,
|
||||
autoPanSpeed,
|
||||
nodesDraggable,
|
||||
panBy,
|
||||
findNode,
|
||||
@@ -132,7 +133,7 @@ export function useDrag(params: UseDragParams) {
|
||||
return
|
||||
}
|
||||
|
||||
const [xMovement, yMovement] = calcAutoPan(mousePosition, containerBounds)
|
||||
const [xMovement, yMovement] = calcAutoPan(mousePosition, containerBounds, autoPanSpeed.value)
|
||||
|
||||
if (xMovement !== 0 || yMovement !== 0) {
|
||||
const nextPos = {
|
||||
|
||||
Reference in New Issue
Block a user