Refactor DragZone.mjs to rely on the built-in "auto-stealing" behavior of Neo.container.Base.
Changes:
- 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.
- 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.
Refactor
DragZone.mjsto rely on the built-in "auto-stealing" behavior ofNeo.container.Base.Changes:
me.owner.remove(component, false)call. When theDragProxyContaineris initialized with the component in itsitemsarray, the framework automatically removes the component from its previous parent.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.