The current logic is too complicated, especially in case there are multiple drag zones in use.
E.g.:
afterSetScrollContainerId(value, oldValue) {
if (value) {
let me = this,
owner = me.owner,
listenerId;
if (owner.mounted) {
Neo.main.addon.DragDrop.setScrollContainer({
id: value
});
} else {
listenerId = owner.on('mounted', () => {
owner.un('mounted', listenerId);
me.afterSetScrollContainerId(value, oldValue);
});
}
}
}
This approach forces each drag zone owner to set & reset the related main thread configs on drag:start & end.
Instead, each drag zone should send the relevant main thread configs over onDragStart() and the main thread addon needs to reset them on drag:end.
there should be a method like "getMainThreadConfigs" which child drag (&sort) zone classes can extend.
looking into this now.
The current logic is too complicated, especially in case there are multiple drag zones in use.
E.g.:
afterSetScrollContainerId(value, oldValue) { if (value) { let me = this, owner = me.owner, listenerId; if (owner.mounted) { Neo.main.addon.DragDrop.setScrollContainer({ id: value }); } else { listenerId = owner.on('mounted', () => { owner.un('mounted', listenerId); me.afterSetScrollContainerId(value, oldValue); }); } } }This approach forces each drag zone owner to set & reset the related main thread configs on drag:start & end.
Instead, each drag zone should send the relevant main thread configs over onDragStart() and the main thread addon needs to reset them on drag:end.
there should be a method like "getMainThreadConfigs" which child drag (&sort) zone classes can extend.
looking into this now.