Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. function resizeFloor(){
  2. var WW=$(window).width();
  3. var WH=$(window).height()
  4.  
  5. if(params.Direction=='y'){$(node).stop().animate({scrollTop:(floor-1)*WH},1);}
  6. if(params.Direction=='x'){$(node).stop().animate({scrollLeft:(floor-1)*WW},1);}
  7. if(params.Direction=='chocolate'){
  8. var target = AscensorMap[StageOn-1].split('|');
  9. $(node).stop().animate({
  10. scrollLeft:(target[1]-1)*WW,
  11. scrollTop:(target[0]-1)*WH
  12. },1);
  13. }
  14.  
  15.  
  16. $(node).height(WH).width(WW).children(params.ChildType).each(function(){
  17. $(this).height(WH).width(WW);
  18. });
  19.  
  20. if(params.Direction=='x'){
  21. $(node).children().css('position','absolute');
  22. $(node).children().each(function(index){$(this).css('left',index*WW);})
  23. }
  24.  
  25. if(params.Direction=='chocolate'){
  26. $(node).children(params.ChildType).each(function(index){
  27. var CoordName = AscensorMap[index].split('|');
  28. $(this).css({'position':'absolute', 'left':(CoordName[1]-1)*WW, 'top':(CoordName[0]-1)*WH});
  29. });
  30. }
  31. }
  32.  
  33. $(node).stop().animate({
  34. scrollLeft:(target[1]-1)*WW,
  35. scrollTop:(target[0]-1)*WH
  36. },1);
  37.  
  38. $(node).stop().scrollTop((target[0]-1)*WH).scrollLeft((target[1]-1)*WW);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement