# all files / diagram-js/lib/features/modeling/cmd/ UpdateWaypointsHandler.js

100% Statements 11/11
100% Branches 0/0
100% Functions 3/3
100% Lines 11/11

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23

    1×

    34×
    34×

    34×

    34×

    34×

    1×

    1×
    1×

    1×

    1×
     export default function UpdateWaypointsHandler() { }

    UpdateWaypointsHandler.prototype.execute = function(context) {

      var connection = context.connection,
          newWaypoints = context.newWaypoints;

      context.oldWaypoints = connection.waypoints;

      connection.waypoints = newWaypoints;

      return connection;
    };

    UpdateWaypointsHandler.prototype.revert = function(context) {

      var connection = context.connection,
          oldWaypoints = context.oldWaypoints;

      connection.waypoints = oldWaypoints;

      return connection;
    };