Skip to content

Refactor shape gizmo interactivity to support future shape tools #2748

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 27, 2025

Conversation

0SlowPoke0
Copy link
Collaborator

@0SlowPoke0 0SlowPoke0 commented Jun 24, 2025

Followup PR of #2683, and this fixes the two bugs mentioned by @Keavon in that.

ShapeGizmoHandler trait

Provides a common interface for shape-specific interactive gizmos (e.g., Star, Polygon).

Defines methods for handling state updates, clicks, dragging, overlays, and cleanup.

ShapeGizmoHandlers enum

Enum wrapper that abstracts over concrete shape gizmo types.

GizmoManager struct

Central controller that detects active gizmo layers, handles hover/click/drag input, and manages rendering.

Groups selected layers by shape type and activates the correct gizmo when hovered.

@Keavon Keavon force-pushed the gizmos-refactor branch from 2febb82 to f34075d Compare June 27, 2025 05:24
@Keavon Keavon merged commit d8d2a51 into master Jun 27, 2025
4 checks passed
@Keavon Keavon deleted the gizmos-refactor branch June 27, 2025 05:34
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.

2 participants