Skip to content

Commit

Permalink
v4.0.8 bump / js build
Browse files Browse the repository at this point in the history
  • Loading branch information
dimsemenov committed May 21, 2015
1 parent 99eedbc commit 63de5f1
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 11 deletions.
2 changes: 1 addition & 1 deletion dist/photoswipe-ui-default.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! PhotoSwipe Default UI - 4.0.7 - 2015-03-18
/*! PhotoSwipe Default UI - 4.0.8 - 2015-05-21
* http://photoswipe.com
* Copyright (c) 2015 Dmitry Semenov; */
/**
Expand Down
2 changes: 1 addition & 1 deletion dist/photoswipe-ui-default.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 24 additions & 5 deletions dist/photoswipe.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! PhotoSwipe - v4.0.7 - 2015-05-04
/*! PhotoSwipe - v4.0.8 - 2015-05-21
* http://photoswipe.com
* Copyright (c) 2015 Dmitry Semenov; */
(function (root, factory) {
Expand Down Expand Up @@ -3464,8 +3464,8 @@ var _historyUpdateTimeout,
return params;
}

var vars = hash.split('&');
for (var i = 0; i < vars.length; i++) {
var i, vars = hash.split('&');
for (i = 0; i < vars.length; i++) {
if(!vars[i]) {
continue;
}
Expand All @@ -3475,7 +3475,19 @@ var _historyUpdateTimeout,
}
params[pair[0]] = pair[1];
}
params.pid = parseInt(params.pid,10)-1;
if(_options.galleryPIDs) {
// detect custom pid in hash and search for it among the items collection
var searchfor = params.pid;
params.pid = 0; // if custom pid cannot be found, fallback to the first item
for(i = 0; i < _items.length; i++) {
if(_items[i].pid === searchfor) {
params.pid = i;
break;
}
}
} else {
params.pid = parseInt(params.pid,10)-1;
}
if( params.pid < 0 ) {
params.pid = 0;
}
Expand All @@ -3502,7 +3514,13 @@ var _historyUpdateTimeout,
}


var newHash = _initialHash + '&' + 'gid=' + _options.galleryUID + '&' + 'pid=' + (_currentItemIndex + 1);
var pid = (_currentItemIndex + 1);
var item = _getItemAt( _currentItemIndex );
if(item.hasOwnProperty('pid')) {
// carry forward any custom pid assigned to the item
pid = item.pid;
}
var newHash = _initialHash + '&' + 'gid=' + _options.galleryUID + '&' + 'pid=' + pid;

if(!_historyChanged) {
if(_windowLoc.hash.indexOf(newHash) === -1) {
Expand Down Expand Up @@ -3673,6 +3691,7 @@ _registerModule('History', {
}
});


/*>>history*/
framework.extend(self, publicMethods); };
return PhotoSwipe;
Expand Down
4 changes: 2 additions & 2 deletions dist/photoswipe.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "photoswipe",
"version": "4.0.7",
"version": "4.0.8",
"engines": {
"node": ">= 0.8.0"
},
Expand Down
2 changes: 1 addition & 1 deletion photoswipe.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "PhotoSwipe",
"title": "Photoswipe",
"description": "",
"version": "4.0.7",
"version": "4.0.8",
"homepage": "http://photoswipe.com",
"demo": "http://photoswipe.com",
"docs": "http://photoswipe.com",
Expand Down

0 comments on commit 63de5f1

Please sign in to comment.