Skip to content

Conversation

@draedful
Copy link
Collaborator

@draedful draedful commented Dec 2, 2025

BREAKING CHANGE: diffX/diffY in onDragUpdate callback now represent
absolute displacement from drag start position instead of incremental
frame-to-frame values.

Changes:

  • diffX/diffY now calculated as currentCoords - startCoords
  • Added startCoords - initial position when drag started
  • Added deltaX/deltaY - incremental change since previous frame
  • Removed integer truncation (| 0) for better precision with slow movements

…g callback

BREAKING CHANGE: `diffX`/`diffY` in `onDragUpdate` callback now represent
absolute displacement from drag start position instead of incremental
frame-to-frame values.

Changes:
- `diffX`/`diffY` now calculated as `currentCoords - startCoords`
- Added `startCoords` - initial position when drag started
- Added `deltaX`/`deltaY` - incremental change since previous frame
- Removed integer truncation (`| 0`) for better precision with slow movements
@gravity-ui-bot
Copy link
Contributor

Preview is ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GraphComponent.onDrag callback provides only incremental diff, missing absolute diff from drag start

3 participants