LearnNewsExamplesServices
Frontmatter
id8045
title[Draggable] Leverage auto-stealing for DragProxyContainer moves
stateClosed
labels
airefactoring
assigneestobiu
createdAtDec 7, 2025, 1:23 PM
updatedAtDec 7, 2025, 1:24 PM
githubUrlhttps://github.com/neomjs/neo/issues/8045
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtDec 7, 2025, 1:24 PM

[Draggable] Leverage auto-stealing for DragProxyContainer moves

Closed v11.17.0 airefactoring
tobiu
tobiu commented on Dec 7, 2025, 1:23 PM

Refactor DragZone.mjs to rely on the built-in "auto-stealing" behavior of Neo.container.Base.

Changes:

  1. createDragProxy: Removed the explicit me.owner.remove(component, false) call. When the DragProxyContainer is initialized with the component in its items array, the framework automatically removes the component from its previous parent.
  2. dragEnd: Removed the explicit me.dragProxy.remove(component, false) call. When the component is added/inserted back into the owner, the framework automatically handles the removal from the proxy.

This change simplifies the code and aligns it with the framework's instance management best practices, ensuring better preservation of controller scopes during the move.

tobiu added the ai label on Dec 7, 2025, 1:23 PM
tobiu added the refactoring label on Dec 7, 2025, 1:23 PM
tobiu assigned to @tobiu on Dec 7, 2025, 1:23 PM
tobiu referenced in commit bb54f7b - "[Draggable] Leverage auto-stealing for DragProxyContainer moves #8045" on Dec 7, 2025, 1:24 PM
tobiu closed this issue on Dec 7, 2025, 1:24 PM