all files / lib/features/modeling/cmd/ UpdateWaypointsHandler.js

63.64% Statements 7/11
100% Branches 0/0
66.67% Functions 2/3
63.64% Lines 7/11
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23      37× 37×   37×   37×   37×                    
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;
};