riktar / jkanban

Vanilla Javascript plugin for manage kanban boards
https://www.riccardotartaglia.it/jkanban/
Apache License 2.0
1.07k stars 299 forks source link

Move board programmatically #38

Closed viniciuszim closed 5 years ago

viniciuszim commented 5 years ago

How can I move a board programmatically?

I want to fix a board in the first position. So I want to move back to the initial position even if another board has been moved to the first one.

I know that I can make a board not draggable, but if you change another card for that position, it will be moved.

viniciuszim commented 5 years ago

I have tried this code, but it didn't work:

dropBoard: function(el, target, source, sibling) { console.log("dropBoard id: " + el.dataset.id); if (el.dataset.id === "_todo") { kanban3.drake.cancel(true); } }

the drake.cancel method doesn't work

marcosrocha85 commented 5 years ago

Hello @viniciuszim, to cancel board drop event, please use kanban3.drakeBoard.cancel(true);

https://jsfiddle.net/zkjfemgL/