client/client.js
// Queue the folder switching if we are mid-animation or waiting for the server
Queue the folder switching if we are mid-animation or waiting for the server
Queue the folder switching if we are mid - animation or waiting for the server
function sendReq(view, viewDest, time) {
      (function queue(time) {
        if ((!droppy.socketWait && !view[0].isAnimating) || time > 2000) {
          var viewLoc = getViewLocation(view);
          showSpinner(view);
          if (!viewLoc || viewDest.length === viewLoc.length) {
            view[0].animDirection = "center";
          } else if (viewDest.length > viewLoc.length) {
            view[0].animDirection = "forward";
          } else {
            view[0].animDirection = "back";
          }
          sendMessage(view[0].vId, "REQUEST_UPDATE", viewDest);
          if (!skipPush) pushHistory(view, viewDest);
        } else setTimeout(queue, 50, time + 50);
      })(time);
    }
function sendReq ( view , viewDest , time ) { ( function queue ( time ) { if ( ( ! droppy . socketWait && ! view [ 0 ] . isAnimating ) || time > 2000 ) { var viewLoc = getViewLocation ( view ) ; showSpinner ( view ) ; if ( ! viewLoc || viewDest . length === viewLoc . length ) { view [ 0 ] . animDirection = "center" ; } else if ( viewDest . length > viewLoc . length ) { view [ 0 ] . animDirection = "forward" ; } else { view [ 0 ] . animDirection = "back" ; } sendMessage ( view [ 0 ] . vId , "REQUEST_UPDATE" , viewDest ) ; if ( ! skipPush ) pushHistory ( view , viewDest ) ; } else setTimeout ( queue , 50 , time + 50 ) ; } ) ( time ) ; }
Queue the folder switching if we are mid-animation or waiting for the server
Queue the folder switching if we are mid - animation or waiting for the server
// Find the direction in which we should animate // Skip the push if we're already navigating through history