UpdateWaypointsHandler.js 523 B

1234567891011121314151617181920212223
  1. export default function UpdateWaypointsHandler() { }
  2. UpdateWaypointsHandler.prototype.execute = function(context) {
  3. var connection = context.connection,
  4. newWaypoints = context.newWaypoints;
  5. context.oldWaypoints = connection.waypoints;
  6. connection.waypoints = newWaypoints;
  7. return connection;
  8. };
  9. UpdateWaypointsHandler.prototype.revert = function(context) {
  10. var connection = context.connection,
  11. oldWaypoints = context.oldWaypoints;
  12. connection.waypoints = oldWaypoints;
  13. return connection;
  14. };