Skip to content

PyVizAST Prerelease 0.7.0-rc2

Pre-release
Pre-release

Choose a tag to compare

@ChidcGithub ChidcGithub released this 13 Mar 12:15
· 15 commits to main since this release

Virtual Cursor System Rewrite

Complete Refactor:

  • Unified state management: Single cursorStateRef object instead of multiple states
  • Smooth position interpolation with CURSOR_SMOOTH and SNAP_SMOOTH factors
  • CSS variables for theme support (--cursor-bg, --cursor-border, etc.)
  • Cleaner class naming: cursor-dot, cursor-ring, cursor-progress, cursor-snap

Snap Animation:

  • Smooth snap indicator following with separate smooth factor (0.2)
  • First snap initializes position immediately to avoid delay
  • Snap indicator now correctly follows node center position

Performance Optimizations:

  • CSS transform instead of left/top for GPU acceleration
  • Use node.renderedPosition() for accurate screen coordinates
  • opacity transitions instead of display for smoother animations
  • CSS will-change for optimized rendering

Bug Fixes:

  • Fixed CSS animation conflicting with JS position (use margin centering)
  • Fixed snap position using renderedPosition() instead of manual calculation
  • Fixed snap selecting wrong node (distance squared comparison bug)
  • Added validation for renderedPosition() return values

Files Modified:

  • frontend/src/components/ASTVisualizer.js - Complete cursor system rewrite
  • frontend/src/components/components.css - CSS variables, simplified animations
  • frontend/src/App.js - Removed unused GestureType import