Skip to content

Conversation

@Antamansid
Copy link
Collaborator

@Antamansid Antamansid commented Dec 14, 2025

Fixed TypeError when dragging a block by clicking on an anchor.

Changes:

  • Added view component storage to AnchorState (setViewComponent/getViewComponent)
    following the same pattern as BlockState
  • Registered Anchor view component in AnchorState during Anchor construction
  • Made Anchor draggable and delegate drag events to parent Block via
    handleDragStart/handleDrag/handleDragEnd overrides

This allows anchors to be dragged naturally while the parent block moves,
keeping drag logic encapsulated within the Anchor component itself.

@gravity-ui-bot
Copy link
Contributor

Preview is ready.

@Antamansid Antamansid marked this pull request as ready for review December 14, 2025 20:24
@Antamansid Antamansid requested a review from draedful as a code owner December 14, 2025 20:24
@Antamansid Antamansid merged commit bc95c4b into main Dec 15, 2025
4 checks passed
@Antamansid Antamansid deleted the fix_drag_for_anchor branch December 15, 2025 12:04
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.

4 participants