From 144b4af7f0bdcb261f2f742f33c69285c0ad4d8f Mon Sep 17 00:00:00 2001 From: Dmitry Semenov Date: Wed, 25 Feb 2015 17:52:18 +0200 Subject: [PATCH] 4.0.6 build --- .jshintrc | 2 +- dist/default-skin/default-skin.css | 4 +-- dist/photoswipe-ui-default.js | 16 +++++++-- dist/photoswipe-ui-default.min.js | 4 +-- dist/photoswipe.js | 42 +++++++++++------------ dist/photoswipe.min.js | 4 +-- website/documentation/performance-tips.md | 2 +- 7 files changed, 41 insertions(+), 33 deletions(-) diff --git a/.jshintrc b/.jshintrc index 02a97768a..353086e17 100644 --- a/.jshintrc +++ b/.jshintrc @@ -16,7 +16,7 @@ "trailing": true, "undef": true, "unused": true, - "maxlen": 130, + "maxlen": 140, "predef": [ "define", diff --git a/dist/default-skin/default-skin.css b/dist/default-skin/default-skin.css index 5f548b111..846c6b8a8 100644 --- a/dist/default-skin/default-skin.css +++ b/dist/default-skin/default-skin.css @@ -180,12 +180,12 @@ color: #000; text-decoration: none; font-size: 14px; - line-height: 18px; - /* round corners on the first/last list item */ } + line-height: 18px; } .pswp__share-tooltip a:hover { text-decoration: none; color: #000; } .pswp__share-tooltip a:first-child { + /* round corners on the first/last list item */ border-radius: 2px 2px 0 0; } .pswp__share-tooltip a:last-child { border-radius: 0 0 2px 2px; } diff --git a/dist/photoswipe-ui-default.js b/dist/photoswipe-ui-default.js index e8ec08d58..58df3c190 100644 --- a/dist/photoswipe-ui-default.js +++ b/dist/photoswipe-ui-default.js @@ -1,4 +1,4 @@ -/*! PhotoSwipe Default UI - 4.0.5 - 2015-01-27 +/*! PhotoSwipe Default UI - 4.0.6 - 2015-02-25 * http://photoswipe.com * Copyright (c) 2015 Dmitry Semenov; */ /** @@ -694,8 +694,18 @@ var PhotoSwipeUI_Default = _countNumItems(); }; - ui.updateFullscreen = function() { - _togglePswpClass(pswp.template, 'fs', _fullscrenAPI.isFullscreen()); + ui.updateFullscreen = function(e) { + + if(e) { + // some browsers change window scroll position during the fullscreen + // so PhotoSwipe updates it just in case + setTimeout(function() { + pswp.setScrollOffset( 0, framework.getScrollY() ); + }, 50); + } + + // toogle pswp--fs class on root element + framework[ (_fullscrenAPI.isFullscreen() ? 'add' : 'remove') + 'Class' ](pswp.template, 'pswp--fs'); }; ui.updateIndexIndicator = function() { diff --git a/dist/photoswipe-ui-default.min.js b/dist/photoswipe-ui-default.min.js index dfd9f5f1d..88d405f6f 100644 --- a/dist/photoswipe-ui-default.min.js +++ b/dist/photoswipe-ui-default.min.js @@ -1,4 +1,4 @@ -/*! PhotoSwipe Default UI - 4.0.5 - 2015-01-27 +/*! PhotoSwipe Default UI - 4.0.6 - 2015-02-25 * http://photoswipe.com * Copyright (c) 2015 Dmitry Semenov; */ -!function(a,b){"function"==typeof define&&define.amd?define(b):"object"==typeof exports?module.exports=b():a.PhotoSwipeUI_Default=b()}(this,function(){"use strict";var a=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v=this,w=!1,x=!0,y=!0,z={barsSize:{top:44,bottom:"auto"},closeElClasses:["item","caption","zoom-wrap","ui","top-bar"],timeToIdle:4e3,timeToIdleOutside:1e3,loadingIndicatorDelay:1e3,addCaptionHTMLFn:function(a,b){return a.title?(b.children[0].innerHTML=a.title,!0):(b.children[0].innerHTML="",!1)},closeEl:!0,captionEl:!0,fullscreenEl:!0,zoomEl:!0,shareEl:!0,counterEl:!0,arrowEl:!0,preloaderEl:!0,tapToClose:!1,tapToToggleControls:!0,clickToCloseNonZoomable:!0,shareButtons:[{id:"facebook",label:"Share on Facebook",url:"https://www.facebook.com/sharer/sharer.php?u={{url}}"},{id:"twitter",label:"Tweet",url:"https://twitter.com/intent/tweet?text={{text}}&url={{url}}"},{id:"pinterest",label:"Pin it",url:"http://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}"},{id:"download",label:"Download image",url:"{{raw_image_url}}",download:!0}],getImageURLForShare:function(){return a.currItem.src||""},getPageURLForShare:function(){return window.location.href},getTextForShare:function(){return a.currItem.title||""},indexIndicatorSep:" / "},A=function(a){if(r)return!0;a=a||window.event,q.timeToIdle&&q.mouseUsed&&!k&&K();for(var c,d,e=a.target||a.srcElement,f=e.className,g=0;g-1&&(c.onTap(),d=!0);if(d){a.stopPropagation&&a.stopPropagation(),r=!0;var h=b.features.isOldAndroid?600:30;s=setTimeout(function(){r=!1},h)}},B=function(){return!a.likelyTouchDevice||q.mouseUsed||screen.width>1200},C=function(a,c,d){b[(d?"add":"remove")+"Class"](a,"pswp__"+c)},D=function(){var a=1===q.getNumItemsFn();a!==p&&(C(d,"ui--one-slide",a),p=a)},E=function(){C(i,"share-modal--hidden",y)},F=function(){return y=!y,y?(b.removeClass(i,"pswp__share-modal--fade-in"),setTimeout(function(){y&&E()},300)):(E(),setTimeout(function(){y||b.addClass(i,"pswp__share-modal--fade-in")},30)),y||H(),!1},G=function(b){b=b||window.event;var c=b.target||b.srcElement;return a.shout("shareLinkClick",b,c),c.href?c.hasAttribute("download")?!0:(window.open(c.href,"pswp_share","scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,top=100,left="+(window.screen?Math.round(screen.width/2-275):100)),y||F(),!1):!1},H=function(){for(var a,b,c,d,e,f="",g=0;g