Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2014
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.      if (cancelSwipe) return;  
  2.         if (currentEvent == _event) return;
  3.         currentEvent = _event;    
  4.         if (xStart > _event.x && (xStart - _event.x > swipeValue) && itemId != fullLength-1) {
  5.             Ti.API.info("Swipe xStart ", xStart, " ev.x ", _event.x, " swVal ", swipeValue);
  6.             cancelSwipe = true;
  7.             xStart = _event.x;
  8.             itemId++;
  9.             $.createRecipeListItem(recipesList[itemId], itemId);    
  10.             $.navigateInfo.text = (itemId + 1) + ' / ' + fullLength;    
  11.             Ti.API.info("exit touchmove");                
  12.         } else if (xStart < _event.x && (_event.x - xStart > swipeValue) && itemId != 0) {
  13.             cancelSwipe = true;
  14.             xStart = _event.x;
  15.             itemId--;
  16.             $.createRecipeListItem(recipesList[itemId], itemId);
  17.             $.navigateInfo.text = (itemId + 1) + ' / ' + fullLength;        
  18.         }  
  19.         currentEvent = {};    
  20.     });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement