code: function reconstructRoute(parents, points, tailPoint, from, to, grid, opt) {
  
          var route = [];
  
          var prevDiff = normalizePoint(to.difference(tailPoint));
  
          // tailPoint is assumed to be aligned already
          var currentKey = getKey(tailPoint);
          var parent = parents[currentKey];
  
          var point;
          while (parent) {
  
              // point is assumed to be aligned already
              point = points[currentKey];
  
              var diff = normalizePoint(point.difference(parent));
              if (!diff.equals(prevDiff)) {
                  route.unshift(point);
                  prevDiff = diff;
              }
  
              // parent is assumed to be aligned already
              currentKey = getKey(parent);
              parent = parents[currentKey];
          }
  
          // leadPoint is assumed to be aligned already
          var leadPoint = points[currentKey];
  
          var fromDiff = normalizePoint(leadPoint.difference(from));
          if (!fromDiff.equals(prevDiff)) {
              route.unshift(leadPoint);
          }
  
          return route;
      }
docs: PATHFINDING // reconstructs a route by concatenating points with their parents