Giter Club home page Giter Club logo

Comments (5)

marcosrocha85 avatar marcosrocha85 commented on June 1, 2024 2

In my case I decided to make all boards fixed so I haven't had that problem. In any case, I guess you can cancel dragging at "drop" event of jKanban by comparing target and source and then cancel dragula like:

jkanban = new jKanban({
    element: "#mykanban",
    dropBoard: function(el, target, source, sibling) {
        if (target.dataset.id === "_backlog") {
            jkanban.drake.cancel(true);
        }
    }
});

from jkanban.

poetawd avatar poetawd commented on June 1, 2024 1

from jkanban.

poetawd avatar poetawd commented on June 1, 2024

This is how I made it.... It is a HACK... but works....

  //Init Drag Board
                self.drakeBoard = self.dragula([self.container], {
                    moves: function (el, source, handle, sibling) {
                        if (!self.options.dragBoards) return false;
                        
                        if ( handle.classList.contains('kanban-fixed') )  return false;
                        
                        return (handle.classList.contains('kanban-board-header') || handle.classList.contains('kanban-title-board'));
                    },

And Added the class kanban-fixed to NOT MOVABLE boards....

It would be VERY NICE to have a option in board object to be not movable....

Thank you

from jkanban.

poetawd avatar poetawd commented on June 1, 2024

The only problem that I cant fix is that other boards still can take place of Backlog and Finished boards... :(

from jkanban.

darkvovich avatar darkvovich commented on June 1, 2024

For boards correct is jkanban.drakeBoard.cancel(true);

from jkanban.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.