Changeset 21125


Ignore:
Timestamp:
2011/08/04 19:08:40 (9 years ago)
Author:
468
Message:

#1413 スマートフォン版縦横切り替え時、フリッカーのスライド横幅が再計算される処理の修正

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_11-dev/html/user_data/packages/sphone/js/jquery.flickslide.js

    r21090 r21125  
    77//if(typeof $(this)===undefined||$(this).length===0){return;} 
    88window.addEventListener("orientationchange",function(){if(runiLayout!==true){return} 
    9 switch(window.orientation){case 0:orientationChangeCore();break;case 90:orientationChangeCore();break;case-90:orientationChangeCore();break;}},false);function orientationChangeCore(){clearTimeout(slideTimer);setTimeout(function(){var styles=getComputedStyle($('.moveWrap').get(0));if(styles){$('.resizable').css('width',styles.width);$('.slideMask').css('height',$('.move').outerHeight()).css('width',styles.width-1);maxX=Number($('.flickSlideContainer li.slideUnit').length-1)*Number(styles.width.replace('px',''))*-1;$('div.flickSlideContainer ul.move').get(0).style.webkitTransform='translate3d(0,0,0)';currentX=0;slideCount=0;slidePager();slideTimer=setTimeout(lotation,slideDuration);}else{}},orientationChangeDelay);} 
     9switch(window.orientation){case 0:orientationChangeCore();break;case 90:orientationChangeCore();break;case-90:orientationChangeCore();break;}},false);function orientationChangeCore(){clearTimeout(slideTimer);setTimeout(function(){var styles=getComputedStyle($('.moveWrap').get(0));if(styles){$('.resizable').css('width',styles.width);$('.slideMask').css('height',$('.move').outerHeight()).css('width',styles.width-1); 
     10maxX=Number($(settings.parentArea + ' .flickSlideContainer li.slideUnit').length-1)*Number(getComputedStyle($(settings.parentArea + ' .flickSlideContainer li.slideUnit').get(0)).width.replace('px',''))*-1; 
     11$('div.flickSlideContainer ul.move').get(0).style.webkitTransform='translate3d(0,0,0)'; 
     12currentX=0;slideCount=0;slidePager();slideTimer=setTimeout(lotation,slideDuration);}else{}},orientationChangeDelay);} 
    1013function lotation(){ 
    1114//if(slideLock===0){var slideUnitWidth=slideObj.children('li.slideUnit').outerWidth();slideObj.get(0).style.webkitTransition='-webkit-transform 0.6s ease-out';diffX=-151;if(currentX===maxX){slideObj.get(0).style.webkitTransform='translate3d(0, 0, 0)';currentX=0;slideCount=0;slidePager();}else{currentX=currentX-slideUnitWidth;slideObj.get(0).style.webkitTransform='translate3d('+currentX+'px, 0, 0)';slideCount++;slidePager();}} 
     
    2528wrap.contents().find('ul.move').append(unitElem);bottom.children('ul.slidePager').append(pager);} 
    2629//スライド最大幅を表示エリアの横幅×liの数→liの横幅×liの数に変更 
    27 $(settings.target).after(wrap);$(settings.target).remove();bottom.children('.bottomLeft').slideButton({direction:'prev',widthSource:wrap.contents().find('li.slideUnit')});bottom.children('.bottomRight').slideButton({direction:'next',widthSource:wrap.contents().find('li.slideUnit')});wrap.contents().find('ul.move').touchDrag({duration:settings.duration,targetWidth:(targetWidth*0.4)});if(contentsLength > 1) {wrap.after(bottom)} else {wrap.after(bottom2)};$(window).bind('load',function(){var styles=getComputedStyle($('.moveWrap').get(0));if(styles){$('.resizable').css('width',styles.width);$('.slideMask').css('height',$('.move').outerHeight()).css('width',styles.width-1);maxX=Number($(settings.parentArea + ' .flickSlideContainer li.slideUnit').length-1)*Number(getComputedStyle($(settings.parentArea + ' .flickSlideContainer li.slideUnit').get(0)).width.replace('px',''))*-1;} 
     30$(settings.target).after(wrap);$(settings.target).remove();bottom.children('.bottomLeft').slideButton({direction:'prev',widthSource:wrap.contents().find('li.slideUnit')});bottom.children('.bottomRight').slideButton({direction:'next',widthSource:wrap.contents().find('li.slideUnit')});wrap.contents().find('ul.move').touchDrag({duration:settings.duration,targetWidth:(targetWidth*0.4)});if(contentsLength > 1) {wrap.after(bottom)} else {wrap.after(bottom2)};$(window).bind('load',function(){var styles=getComputedStyle($('.moveWrap').get(0));if(styles){$('.resizable').css('width',styles.width);$('.slideMask').css('height',$('.move').outerHeight()).css('width',styles.width-1); 
     31maxX=Number($(settings.parentArea + ' .flickSlideContainer li.slideUnit').length-1)*Number(getComputedStyle($(settings.parentArea + ' .flickSlideContainer li.slideUnit').get(0)).width.replace('px',''))*-1;} 
    2832var slideFirstChild=$('ul.move li:first').clone();$('ul.move').show();});}})(jQuery);var is={ie:navigator.appName=='Microsoft Internet Explorer',java:navigator.javaEnabled(),ns:navigator.appName=='Netscape',ua:navigator.userAgent.toLowerCase(),version:parseFloat(navigator.appVersion.substr(21))||parseFloat(navigator.appVersion),win:navigator.platform=='Win32'} 
    2933is.mac=is.ua.indexOf('mac')>=0;if(is.ua.indexOf('opera')>=0){is.ie=is.ns=false;is.opera=true;} 
Note: See TracChangeset for help on using the changeset viewer.