0%
    /// 360 //////////// window.onload = init; var images = []; var product; function init() { var ratio = 1; var img_w = ; var img_h = ; if (img_w > 0 && img_h > 0) { ratio = img_w / img_h; } var h360_init = $(window).height() - 50; var w360_init = $(window).width(); var h360 = 0; var w360 = 0; var ratio2 = w360_init / h360_init; if (ratio2 > 1) { w360 = h360_init * ratio; h360 = h360_init; } else { h360 = w360_init / ratio; w360 = w360_init; } if(h360>h360_init){ h360=h360_init; w360 = h360_init * ratio; } if(w360>w360_init){ w360 = h360_init * ratio; h360 = h360_init; } car = $('.car').ThreeSixty({ totalFrames: 0, endFrame: 0, currentFrame: 1, imgList: '.threesixty_images', progress: '.spinner', imgArray: images, imagePath: '/files/', filePrefix: '', ext: '.jpg', iiif: true, width: w360, height: h360 + 50, navigation: true, responsive: false, disableSpin: true, playSpeed:250, speedMultiplier:1, framerate:5, }); } // ACTIONS //// $('#zoom').height($(window).height()); $("#360_DONE").change(function () { $('.nav_bar').append(''); $(".nav_bar_360").click(function () { car.stop(); var num = $('.current-image').attr('data-num'); dragonviewer.goToPage(num); $("#360").hide(); $("#zoom").show(); setTimeout(function () { dragonviewer.viewport.zoomBy( dragonviewer.zoomPerClick / 0.5 ); dragonviewer.viewport.applyConstraints(); }, 100); }); $("#zoom .navbar").click(function () { $("#360").show(); $("#zoom").hide(); }); });