v0.5.1 - Port Coordinate System Fix
Bug Fixes
- Fixed edge drag offset: Resolved issue where edge dragging was severely offset from cursor when using custom port renderers
- Root cause: Coordinate system mismatch between screen coordinates (for hit testing) and canvas coordinates (for MainCanvas rendering with MatrixTransform)
API Improvements
- New explicit coordinate methods:
GetPortScreenPosition()- Returns port position in screen coordinates (for hit testing, distance calculations)GetPortCanvasPosition()- Returns port position in canvas coordinates (for drawing on MainCanvas)
- Previous
GetPortPosition()renamed toGetPortScreenPosition()for clarity
Migration
If you were using GraphRenderer.GetPortPosition(), update to use either:
GetPortScreenPosition()for hit testing and distance calculationsGetPortCanvasPosition()when drawing on the canvas