How to use the @shopify/draggable/lib/es5/draggable.bundle.legacy.js.Sortable function in @shopify/draggable

To help you get started, we’ve selected a few @shopify/draggable 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 learningequality / kolibri / kolibri / core / assets / src / views / sortable / DragContainer.vue View on Github external
initialize() {
        this.sortable = new Sortable(this.$el, {
          draggable: `.${SORTABLE_CLASS}`,
          handle: `.${HANDLE_CLASS}`,
          delay: 250,
          mirror: {
            constrainDimensions: true,
            xAxis: false,
          },
          plugins: [Plugins.SwapAnimation],
        });

        // Remove default focusable plugin and undo damage.
        // ref: https://github.com/Shopify/draggable/issues/317
        this.sortable.removePlugin(Draggable.Plugins.Focusable);
        this.$el.tabIndex = -1;
        Array.from(this.$el.children).forEach(child => (child.tabIndex = -1));