Skip to content
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

feat(dia.ElementView): add getTargetParentView() method #2748

Merged
merged 1 commit into from
Sep 2, 2024

Conversation

kumilingus
Copy link
Contributor

Description

dia.ElementView.prototype.getTargetParentView(evt: dia.Event): dia.CellView | null;

The method returns a cell view (if any) that would become the parent of the currently dragged element view if the dragging were to finish immediately.

Usage

paper.on('element:pointermove', (elementView, evt) => {
    console.log(elementView.getTargetParentView(evt));
});

// It can also be used while the user is dragging an element from the stencil
stencil.on('element:drag', (cloneView, evt) => {
    console.log(cloneView.getTargetParentView(evt));
});

@kumilingus kumilingus merged commit 0d29e70 into clientIO:master Sep 2, 2024
3 checks passed
@clientIO clientIO deleted a comment from zbynekstara Sep 2, 2024
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