Skip to content

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

Merged
kumilingus merged 1 commit into
clientIO:masterfrom
MartinKanera:feat/enhance-unembedding-validation
Aug 18, 2025
Merged

feat(dia.ElementView): allow setting initialParentId explicitly for unembedding validation#3024
kumilingus merged 1 commit into
clientIO:masterfrom
MartinKanera:feat/enhance-unembedding-validation

Conversation

@MartinKanera

@MartinKanera MartinKanera commented Jul 29, 2025

Copy link
Copy Markdown
Contributor

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.

Copilot AI left a comment

Copy link
Copy Markdown

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

Comment thread packages/joint-core/src/dia/ElementView.mjs
@kumilingus
kumilingus merged commit 8a7953d into clientIO:master Aug 18, 2025
3 checks passed
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.

3 participants