1

フォトスワイプ インスタンスがページに表示されると、同じページの選択ボックスは android 2.3.x (エミュレーターでテストされた 2.3.3、Galaxy S2 でテストされた 2.3.5) では機能しなくなりました。

ときthumbstrip_z.show(0); 選択ボックスが再び機能する下のスクリプトでコメントされています。

これを修正できますか、それとも何か間違っていますか?

よろしく、カート

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>test</title>
    <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css" />
    <link href="http://www.photoswipe.com/latest/photoswipe.css" type="text/css" rel="stylesheet" />
    <script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
    <script type="text/javascript" src="http://www.photoswipe.com/latest/lib/klass.min.js"></script>
    <script src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script>
    <script type="text/javascript" src="http://www.photoswipe.com/latest/code.photoswipe.jquery-3.0.4.min.js"></script>
</head>

<body>
    <div data-theme="d" data-role="page">
        <div class="photo_holder" id="media_pics">
            <div id="album_z" class="album">
                <div id="paging_z" class="paging" style="height:300px;">

                </div>
            </div>
        </div>
        <select><option value="0">0</option><option value="1">1</option><option value="2">2</option></select>
    </div>

<script type="text/javascript">
    var fullscreenPhotoSwipePhotos_z = new Array(); 
    var thumbstripPhotos_z = new Array();

    fullscreenPhotoSwipePhotos_z[0] = { url: 'http://media.leisure-ict.net/photo/web/500/BE-1000-01_2010050338028065371.jpg', caption: 'cap1', id: 0};
    thumbstripPhotos_z[0] = { url: 'http://media.leisure-ict.net/photo/web/170/BE-1000-01_2010050338028065371.jpg', caption: 'cap1', id: 0};
    fullscreenPhotoSwipePhotos_z[1] = { url: 'http://media.leisure-ict.net/photo/web/500/BE-1000-01_2010050338020829330.jpg', caption: 'cap1)', id: 1};
    thumbstripPhotos_z[1] = { url: 'http://media.leisure-ict.net/photo/web/170/BE-1000-01_2010050338020829330.jpg', caption: 'cap1', id: 1};
    fullscreenPhotoSwipePhotos_z[2] = { url: 'http://media.leisure-ict.net/photo/web/500/BE-1000-01_2010050338081598787.jpg', caption: 'cap1', id: 2};
    thumbstripPhotos_z[2] = { url: 'http://media.leisure-ict.net/photo/web/170/BE-1000-01_2010050338081598787.jpg', caption: 'cap1', id: 2};
    fullscreenPhotoSwipePhotos_z[3] = { url: 'http://media.leisure-ict.net/photo/web/500/BE-1000-01_2010050338024088090.jpg', caption: 'cap1', id: 3};
    thumbstripPhotos_z[3] = { url: 'http://media.leisure-ict.net/photo/web/170/BE-1000-01_2010050338024088090.jpg', caption: 'cap1', id: 3};
    fullscreenPhotoSwipePhotos_z[4] = { url: 'http://media.leisure-ict.net/photo/web/500/BE-1000-01_2010050338049077588.jpg', caption: 'cap1', id: 4};
    thumbstripPhotos_z[4] = { url: 'http://media.leisure-ict.net/photo/web/170/BE-1000-01_2010050338049077588.jpg', caption: 'cap1', id: 4};

    (function(window, Util, PhotoSwipe){

        Util.Events.domReady(function(e){

            var thumbstrip_z;
            var fullscreenPhotoSwipe_z;

            var showSummerEl;

            fullscreenPhotoSwipe_z = PhotoSwipe.attach(
                fullscreenPhotoSwipePhotos_z,
                {
                    getImageSource: function(obj){
                        return obj.url;
                    },
                    getImageCaption: function(obj){
                        return obj.caption;
                    },
                    captionAndToolbarHide: false,
                    margin: 0
                }
            );

            thumbstrip_z = PhotoSwipe.attach(
                thumbstripPhotos_z,
                {
                    target: window.document.querySelectorAll('#paging_z')[0],
                    preventHide: true,
                    getImageSource: function(obj){
                        return obj.url;
                    },
                    getImageCaption: function(obj){
                        return obj.caption;
                    },
                    captionAndToolbarHide: true,
                    margin: 0,
                    //imageScaleMethod: "fitNoUpscale",
                    swipeThreshold: 100,
                    swipeTimeThreshold: 10
                }
            );

            thumbstrip_z.show(0);

            // onTouch
            thumbstrip_z.addEventHandler(PhotoSwipe.EventTypes.onTouch, function(e){
                if(e.action === 'tap' || e.action === 'doubleTap'){
                    fullscreenPhotoSwipe_z.show(thumbstrip_z.getCurrentImage().refObj.id);
                }
            });         
        });
    }(window, window.Code.Util, window.Code.PhotoSwipe));
</script>
</body>
</html>
4

0 に答える 0