How to use the ngx-tethys/drag-drop/drag-drop.class.js.ThyDropPosition.in function in ngx-tethys

To help you get started, we’ve selected a few ngx-tethys examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github atinc / ngx-tethys / demo / src / app / components / +tree / basic / tree-basic.component.ts View on Github external
onDragDrop(event: ThyDragDropEvent) {
        let afterId: string;
        const suiteId: string = event.previousItem.origin._id;
        const parenId: string =
            event.position === ThyDropPosition.in ? event.item.origin._id : event.item.parentNode.origin._id;
        const newIndex = event.currentIndex;
        if (newIndex === 0) {
            afterId = '';
        } else {
            afterId = event.containerItems[event.currentIndex - 1].origin._id;
        }
    }

ngx-tethys

Fast and reliable Tethys Design components for Angular by Worktile & PingCode FE Team.

Unrecognized
Latest version published 27 days ago

Package Health Score

82 / 100
Full package analysis