DayPilot.Kanban.onSwimlaneMove

Fired when the swim lane moving is finished (the swim lane is dropped at the target position) but before the swim lane is actually moved. You have a chance to cancel the moving here.

Declaration

DayPilot.Kanban.onSwimlaneMove(args);

Parameters

  • args.swimlane (DayPilot.Swimlane object) - the swim lane being moved
  • args.position (integer) - target position (index)
  • args.previous (DayPilot.Swimlane object) - swim lnae preceding the target position
  • args.next (DayPilot.Swimlane object) - swim lane following the target position
  • args.preventDefault() - cancels the default action

The source data object is accessible as args.swimlane.data.

Example

<div id="dp"></div>

<script type="text/javascript">

    var dp = new DayPilot.Kanban("dp");
    
    // ...

    dp.swimlaneMoveHandling = "Update";

    dp.onSwimlaneMove = function(args) {
      if (!confirm("Do you really want to move this swimlane?")) {
        args.preventDefault();
      }
    };

    dp.init();

</script>