Skip to content

v0.5.1 - Port Coordinate System Fix

Choose a tag to compare

@iwatakeshi iwatakeshi released this 16 Jan 03:04
· 100 commits to master since this release

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 to GetPortScreenPosition() for clarity

Migration

If you were using GraphRenderer.GetPortPosition(), update to use either:

  • GetPortScreenPosition() for hit testing and distance calculations
  • GetPortCanvasPosition() when drawing on the canvas