Skip to content

feat(dia.ElementView): allow setting initialParentId explicitly for unembedding validation #3024

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MartinKanera
Copy link
Contributor

@MartinKanera MartinKanera commented Jul 29, 2025

Description

Do not discard initialParentId that has been explicitly set beforehand in event data.

Motivation and Context

Halo will use the existing mechanism to revert (remove) forked/cloned elements if paper.options.validateUnembedding returns false.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modifies the ElementView's pointer event handling to preserve explicitly set initialParentId values in event data. This change supports validation mechanisms by allowing the initialParentId to be set externally before the unembedding process, rather than being overwritten to null.

  • Prevents overwriting of pre-set initialParentId values in event data
  • Enables external components like Halo to set dummy values for unembedding validation

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