noop,offset:0,followthrough:!1,followthroughSelector:"",followthroughEventName:""}}),define("secondary/sony-draggable",["require","jquery","modernizr","require/sony-global-settings","require/sony-global-utilities"],function(e){var t=e("jquery"),n=e("modernizr"),r=e("require/sony-global-settings"),i=e("require/sony-global-utilities"),s=0,o=function(e){return"mousedown.sonyDraggable-"+e+" touchstart.sonyDraggable-"+e},u=function(e){return"mouseup.sonyDraggable-"+e+" touchend.sonyDraggable-"+e},a=function(e){return"mousemove.sonyDraggable-"+e+" touchmove.sonyDraggable-"+e},f=n.prefixed("transform"),l=function(e,n){var r=this;t.extend(r,{},t.fn.sonyDraggable.defaults,n),r.id=s++,r.$win=t(window),r.$el=e,r.$containment=t(r.containment),r.init()};l.prototype={constructor:l,init:function(){var e=this;e.$containment.on(o(e.id),t.proxy(e.onScrubStart,e)),e.$containment.on(u(e.id)+" click.sonyDraggable-"+e.id,t.proxy(e.onScrubEnd,e)),n.touch||e.$win.on(u(e.id),t.proxy(e.onScrubEnd,e)),e.setDimensions(),e.setPositions()},onScrubStart:function(e){e.stopPropagation();var r=this,i=t(e.target);if(!n.touch){if(e.which!==1)return;e.preventDefault()}if(r.$el.has(i).length===0)return;if(r.nonDraggableChildren)if(t(e.target).closest(r.nonDraggableChildren).length>0||t(e.target).is(r.nonDraggableChildren)){r.targetUndraggable=!0;return}r.useCSS3&&r.$el.css(n.prefixed("transitionDuration"),"0ms"),r.isScrubbing=r.hasPassedThreshold=!1,r.handleStartPosition=r.getPagePosition(e),r.setDimensions(),r.$containment.on(a(r.id),t.proxy(r.scrubbingThreshold,r)),r.$el.trigger("sonyDraggable:dragStart")},scrubbingThreshold:function(e){var t=this,n=t.getPagePosition(e).x-t.handleStartPosition.x,i=t.getPagePosition(e).y-t.handleStartPosition.y;if(r.isLTIE9||!t.dragThreshold||t.isScrubbing){t.isScrubbing=!0,t.onScrubbing(e,n,i);return}if(t.hasPassedThreshold)return;if(Math.abs(n)>t.dragThreshold){t.isScrubbing=!0,t.onScrubbing(e,n,i);return}if(Math.abs(i)>t.dragThreshold){t.hasPassedThreshold=!0;return}},onScrubbing:function(e,t,n){var r=this;e.preventDefault(),r.$el.hasClass("dragging")||r.$el.addClass("dragging"),r.handlePosition.x=r.scrubberLeft+t,r.handlePosition.y=r.scrubberTop+n,r.setPositions()},onScrubEnd:function(e){var t=this;t.isScrubbing&&!t.targetUndraggable&&e.preventDefault(),t.targetUndraggable=!1,t.$containment.off(a(t.id)),t.debouncedScrubDestroy(),t.$el.removeClass("dragging")},debouncedScrubDestroy:t.debounce(200,function(){var e=this;e.scrubDestroy()}),scrubDestroy:function(){var e=this;e.$el.trigger("sonyDraggable:dragEnd",{}),e.snapToBounds&&e.bounds&&(e.axis.indexOf("x")>=0&&e.snapTo("x"),e.axis.indexOf("y")>=0&&e.snapTo("y"))},getPagePosition:function(e){var t=this;if(!e.pageX&&!e.originalEvent)return;t.lastTouch=t.lastTouch||{};if(e.type==="touchmove"||e.type==="touchstart")t.lastTouch=e.originalEvent.touches[0];return{x:e.pageX||t.lastTouch.pageX,y:e.pageY||t.lastTouch.pageY}},snapTo:function(e,t,n){var r=this,i=r.handlePosition[e],s=r.unit==="%"?e==="x"?r.containmentWidth:r.containmentHeight:1,o=r.snapToBounds/100*s,u=[r.bounds[e].min/100*s,r.bounds[e].max/100*s],a=[Math.abs(i-u[0]),Math.abs(i-u[1])],f=Math.min.apply(Math,a),l=u[a.indexOf(f)],c;if(n!=r.snapId)return;r.snapId=n=n||Math.random(),t!==undefined&&(l=t/100*s);if(a[0]>o&&a[1]>o&&t===undefined){r.snapId=null;return}c=Math.floor(.8*i+.2*l);if(i===c){r.handlePosition[e]=l,r.setPositions(),r.snapId=null;return}r.handlePosition[e]=c,r.setPositions(),window.requestAnimationFrame(function(){r.snapTo(e,t,n)})},setPositions:function(e,t){var n=this,r,s,o=0,u=0;n.unit==="px"&&(r=n.handlePosition.x,s=n.handlePosition.y),n.unit==="%"&&(r=n.handlePosition.x/n.containmentWidth*100,s=n.handlePosition.y/n.containmentHeight*100),n.bounds&&(r=n.bounds.x?i.constrain(r,n.bounds.x.min,n.bounds.x.max):r,s=n.bounds.y?i.constrain(s,n.bounds.y.min,n.bounds.y.max):s),e&&(r=e.x,s=e.y),n.axis.indexOf("x")>=0&&(o=r),n.axis.indexOf("y")>=0&&(u=s),n.useCSS3?n.$el.css(f,"translate("+o+n.unit+","+u+n.unit+")"):n.$el.css({left:o+n.unit,top:u+n.unit}),t||n.drag({position:{left:o,top:u}})},setDimensions:function(){var e=this,t,r,i;e.useCSS3?t=e.$el:t=e.$containment,r=(e.$el.outerWidth(!0)-e.$el.width())/2,i=(e.$el.outerHeight(!0)-e.$el.height())/2,r+=e.$containment.get(0).getBoundingClientRect().left,i+=e.$containment.get(0).getBoundingClientRect().top,n.jsautomargins||e.$el.hasClass("sony-carousel-flex")&&(r=(e.$el.parent().width()-e.$el.width())/2),e.containmentWidth=t.width(),e.containmentHeight=t.height(),e.scrubberLeft=e.$el.get(0).getBoundingClientRect().left-r,e.scrubberTop=e.$el.get(0).getBoundingClientRect().top-i},setBounds:function(e){var t=this;t.bounds=e,t.setPositions()},destroy:function(){var e=this;e.$containment.off(o(e.id),t.proxy(e.onScrubStart,e)),e.$containment.off(u(e.id)+" click.sonyDraggable-"+e.id),n.touch||e.$win.off(u(e.id)),e.$el.removeData("sonyDraggable")}},t.fn.sonyDraggable=function(e){var n=Array.prototype.slice.call(arguments,1);return this.each(function(){var r=t(this),i=r.data("sonyDraggable");if(!i){if(typeof e=="string")return;i=new l(r,e),r.data("sonyDraggable",i)}typeof e=="string"&&i[e].apply(i,n)})},t.fn.sonyDraggable.defaults={axis:"xy",unit:"%",nonDraggableChildren:"",dragThreshold:null,handlePosition:{x:0,y:0},bounds:null,snapToBounds:null,useCSS3:!1,drag:function(){}}}),define("secondary/sony-paddles",["require","jquery","require/sony-global-environment"],function(e){var t=e("jquery"),n=e("require/sony-global-environment"),r=function(e,n){var r=this;t.extend(r,{},t.fn.sonyPaddles.defaults,n),r.$el=e,r.init()};r.prototype={constructor:r,init:function(){var e=this;e.setupPaddles(),e.$paddles.on("blur",function(){e.isHovered||(e.$nav.removeClass("show-paddles"),t(this).removeClass("on"))}),e.$paddles.on("focus",function(){e.isHovered||(e.$nav.addClass("show-paddles"),t(this).addClass("on"))}),e.$el.on("mouseenter.sonyPaddles",function(){e.isHovered=!0,e.$nav.addClass("show-paddles")}),e.$el.on("mouseleave.sonyPaddles",function(){e.isHovered=!1,e.$nav.removeClass("show-paddles")})},setupPaddles:function(){var e=this,r=e.useSmallPaddles?"nav-paddle":"pagination-paddle",i=t('<div class="pagination-paddles">'),s=t('<a href="#" class="'+r+" "+e.

Prev | Next
Pg.: 1 ... 33 34 35 36 37 38 39 40 41 42 43 ... 66


Back to home | File page

Subscribe | Register | Login | N