LearnNewsExamplesServices
Frontmatter
id1245
titledraggable.DragZone: register main thread configs
stateClosed
labels
enhancement
assigneestobiu
createdAtOct 14, 2020, 12:36 PM
updatedAtOct 14, 2020, 2:17 PM
githubUrlhttps://github.com/neomjs/neo/issues/1245
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtOct 14, 2020, 2:17 PM

draggable.DragZone: register main thread configs

Closed v8.1.0 enhancement
tobiu
tobiu commented on Oct 14, 2020, 12:36 PM

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.

tobiu added the enhancement label on Oct 14, 2020, 12:36 PM
tobiu assigned to @tobiu on Oct 14, 2020, 12:36 PM
tobiu referenced in commit abe51b3 - "#1245 draggable.DragZone: getMainThreadConfigs()" on Oct 14, 2020, 12:42 PM
tobiu referenced in commit 2f305bf - "#1245 draggable.DragZone: getMainThreadConfigs() => added alwaysFireDragMove" on Oct 14, 2020, 12:44 PM
tobiu referenced in commit 6c8beb4 - "#1245 draggable.DragZone: getMainThreadConfigs() => doc comment" on Oct 14, 2020, 12:45 PM
tobiu referenced in commit f45057b - "#1245 main.addon.DragDrop: setConfigs() => in progress" on Oct 14, 2020, 12:51 PM
tobiu referenced in commit 0725711 - "#1245 draggable.toolbar.DragZone => alwaysFireDragMove: true" on Oct 14, 2020, 12:54 PM
tobiu referenced in commit 80a33ae - "#1245 main.addon.DragDrop: setConfigs() => support for boundaryContainerId" on Oct 14, 2020, 12:58 PM
tobiu referenced in commit 7976c0d - "#1245 draggable.DragZone: boundaryContainerId_ => boundaryContainerId & removed the related logic" on Oct 14, 2020, 1:01 PM
tobiu referenced in commit b76fa70 - "#1245 main.addon.DragDrop: setConfigs() => support for scrollContainerId" on Oct 14, 2020, 1:03 PM
tobiu referenced in commit bed4ea7 - "#1245 draggable.DragZone: scrollContainerId_ => scrollContainerId & adjusted the related logic" on Oct 14, 2020, 1:06 PM
tobiu referenced in commit 3866705 - "#1245 main.addon.DragDrop: onDragEnd() => reset alwaysFireDragMove" on Oct 14, 2020, 1:08 PM
tobiu referenced in commit 02c9709 - "#1245 draggable.DragZone: scrollFactorLeft_ => scrollFactorLeft (same for top) & adjusted the related logic" on Oct 14, 2020, 1:11 PM
tobiu referenced in commit 12a13b0 - "#1245 main.addon.DragDrop: imported DomAccess to use getElementOrBody()" on Oct 14, 2020, 1:18 PM
tobiu referenced in commit fbbc9f0 - "#1245 main.addon.DragDrop: setConfigs() => generic approach" on Oct 14, 2020, 1:27 PM
tobiu referenced in commit 304d666 - "#1245 main.addon.DragDrop: setConfigs() => added scrollFactorLeft & top to the doc comment" on Oct 14, 2020, 1:28 PM
tobiu closed this issue on Oct 14, 2020, 2:17 PM