Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function resizeFloor(){
- var WW=$(window).width();
- var WH=$(window).height()
- if(params.Direction=='y'){$(node).stop().animate({scrollTop:(floor-1)*WH},1);}
- if(params.Direction=='x'){$(node).stop().animate({scrollLeft:(floor-1)*WW},1);}
- if(params.Direction=='chocolate'){
- var target = AscensorMap[StageOn-1].split('|');
- $(node).stop().animate({
- scrollLeft:(target[1]-1)*WW,
- scrollTop:(target[0]-1)*WH
- },1);
- }
- $(node).height(WH).width(WW).children(params.ChildType).each(function(){
- $(this).height(WH).width(WW);
- });
- if(params.Direction=='x'){
- $(node).children().css('position','absolute');
- $(node).children().each(function(index){$(this).css('left',index*WW);})
- }
- if(params.Direction=='chocolate'){
- $(node).children(params.ChildType).each(function(index){
- var CoordName = AscensorMap[index].split('|');
- $(this).css({'position':'absolute', 'left':(CoordName[1]-1)*WW, 'top':(CoordName[0]-1)*WH});
- });
- }
- }
- $(node).stop().animate({
- scrollLeft:(target[1]-1)*WW,
- scrollTop:(target[0]-1)*WH
- },1);
- $(node).stop().scrollTop((target[0]-1)*WH).scrollLeft((target[1]-1)*WW);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement