Skip to content

Commit

Permalink
4.0.7 build
Browse files Browse the repository at this point in the history
  • Loading branch information
dimsemenov committed Mar 18, 2015
1 parent e708ff0 commit 2572dbd
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 18 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "photoswipe",
"version": "4.0.6",
"version": "4.0.7",
"homepage": "http://photoswipe.com",
"authors": [
"Dmitry Semenov <diiiimaaaa@gmail.com>"
Expand Down
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.6 - 2015-02-25
/*! PhotoSwipe Default UI - 4.0.7 - 2015-03-18
* 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.

3 changes: 1 addition & 2 deletions dist/photoswipe.css
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@
top: 0;
width: 100%;
height: 100%;
-webkit-backface-visibility: hidden;
will-change: transform; }
overflow: hidden; }

.pswp__container, .pswp__zoom-wrap {
-ms-touch-action: none;
Expand Down
32 changes: 24 additions & 8 deletions dist/photoswipe.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! PhotoSwipe - v4.0.6 - 2015-03-05
/*! PhotoSwipe - v4.0.7 - 2015-03-18
* http://photoswipe.com
* Copyright (c) 2015 Dmitry Semenov; */
(function (root, factory) {
Expand Down Expand Up @@ -2788,7 +2788,8 @@ var _getItemAt,
}

item.imageAppended = true;

_setImageSize(img, item.w, item.h);

baseDiv.appendChild(img);

if(animate) {
Expand Down Expand Up @@ -2848,6 +2849,10 @@ var _getItemAt,

}
},
_setImageSize = function(img, w, h) {
img.style.width = w + 'px';
img.style.height = h + 'px';
},
_appendImagesPool = function() {

if(_imagesToAppendPool.length) {
Expand All @@ -2873,11 +2878,16 @@ _registerModule('Controller', {
index = _getLoopedId(index);
var item = _getItemAt(index);

if(!item || !item.src || item.loaded || item.loading) {
if(!item || item.loaded || item.loading) {
return;
}

_shout('gettingData', index, item);

if (!item.src) {
return;
}

_preloadImage(item);
},
initController: function() {
Expand Down Expand Up @@ -3074,8 +3084,7 @@ _registerModule('Controller', {
placeholder.src = item.msrc;
}

placeholder.style.width = item.w + 'px';
placeholder.style.height = item.h + 'px';
_setImageSize(placeholder, item.w, item.h);

baseDiv.appendChild(placeholder);
item.placeholder = placeholder;
Expand Down Expand Up @@ -3111,6 +3120,7 @@ _registerModule('Controller', {
img.style.webkitBackfaceVisibility = 'hidden';
img.style.opacity = 1;
img.src = item.src;
_setImageSize(img, item.w, item.h);
_appendImage(index, item, baseDiv, img, true);
}

Expand Down Expand Up @@ -3337,9 +3347,15 @@ _registerModule('DesktopZoom', {
// https://developer.mozilla.org/en-US/docs/Web/Events/wheel
_wheelDelta.x = 0;

if('deltaX' in e) {
_wheelDelta.x = e.deltaX;
_wheelDelta.y = e.deltaY;
if('deltaX' in e) {
if(e.deltaMode === 1 /* DOM_DELTA_LINE */) {
// 18 - average line height
_wheelDelta.x = e.deltaX * 18;
_wheelDelta.y = e.deltaY * 18;
} else {
_wheelDelta.x = e.deltaX;
_wheelDelta.y = e.deltaY;
}
} else if('wheelDelta' in e) {
if(e.wheelDeltaX) {
_wheelDelta.x = -0.16 * e.wheelDeltaX;
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.6",
"version": "4.0.7",
"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.6",
"version": "4.0.7",
"homepage": "http://photoswipe.com",
"demo": "http://photoswipe.com",
"docs": "http://photoswipe.com",
Expand Down
2 changes: 1 addition & 1 deletion website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<div class="section section--head">

<div class="row row--heading">
<h1>PhotoSwipe<a href="https://github.com/dimsemenov/PhotoSwipe/releases"> v4.0.6</a></h1>
<h1>PhotoSwipe<a href="https://github.com/dimsemenov/PhotoSwipe/releases"> v4.0.7</a></h1>
<p>JavaScript gallery, no dependencies.</p>
</div>

Expand Down

0 comments on commit 2572dbd

Please sign in to comment.