in packages/core/src/models/MoveHelper.ts [287:334]
dragMove(props: IMoveHelperDragMoveProps) {
const { point, touchNode } = props
if (!this.dragging) return
if (this.outline.isPointInViewport(point, false)) {
this.activeViewport = this.outline
this.touchNode = touchNode
this.closestNode = this.calcClosestNode(point, this.outline)
} else if (this.viewport.isPointInViewport(point, false)) {
this.activeViewport = this.viewport
this.touchNode = touchNode
this.closestNode = this.calcClosestNode(point, this.viewport)
}
if (!this.activeViewport) return
if (this.activeViewport === this.outline) {
this.outlineClosestDirection = this.calcClosestPosition(
point,
this.outline
)
this.viewportClosestDirection = this.outlineClosestDirection
} else {
this.viewportClosestDirection = this.calcClosestPosition(
point,
this.viewport
)
this.outlineClosestDirection = this.viewportClosestDirection
}
if (this.outline.mounted) {
this.outlineClosestRect = this.calcClosestRect(
this.outline,
this.outlineClosestDirection
)
this.outlineClosestOffsetRect = this.calcClosestOffsetRect(
this.outline,
this.outlineClosestDirection
)
}
if (this.viewport.mounted) {
this.viewportClosestRect = this.calcClosestRect(
this.viewport,
this.viewportClosestDirection
)
this.viewportClosestOffsetRect = this.calcClosestOffsetRect(
this.viewport,
this.viewportClosestDirection
)
}
}