Skip to content

Commit

Permalink
build (js)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimsemenov committed Apr 5, 2017
1 parent d876209 commit b6fdb82
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 21 deletions.
4 changes: 2 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ module.exports = function(grunt) {
'dist/photoswipe.min.js': ['dist/photoswipe.js'],
'dist/photoswipe-ui-default.min.js': ['dist/photoswipe-ui-default.js']
},
preserveComments: 'some'
preserveComments: /^!/i
},
options: {
preserveComments: 'some'
preserveComments: /^!/i
}
},

Expand Down
2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"repository": "dimsemenov/PhotoSwipe",
"description": "JavaScript gallery",
"main": "dist/photoswipe.js",
"version": "4.1.1",
"version": "4.1.2",
"keywords": [
"gallery",
"lightbox",
Expand Down
3 changes: 1 addition & 2 deletions dist/default-skin/default-skin.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@
transition: opacity 0.2s;
-webkit-box-shadow: none;
box-shadow: none; }
.pswp__button:focus,
.pswp__button:hover {
.pswp__button:focus, .pswp__button:hover {
opacity: 1; }
.pswp__button:active {
outline: none;
Expand Down
4 changes: 2 additions & 2 deletions dist/photoswipe-ui-default.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*! PhotoSwipe Default UI - 4.1.1 - 2015-12-24
/*! PhotoSwipe Default UI - 4.1.2 - 2017-04-05
* http://photoswipe.com
* Copyright (c) 2015 Dmitry Semenov; */
* Copyright (c) 2017 Dmitry Semenov; */
/**
*
* UI on top of main sliding area (caption, arrows, close button, etc.).
Expand Down
6 changes: 3 additions & 3 deletions dist/photoswipe-ui-default.min.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion dist/photoswipe.css
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@
height: 100%;
background: #000;
opacity: 0;
transform: translateZ(0);
-webkit-transform: translateZ(0);
transform: translateZ(0);
-webkit-backface-visibility: hidden;
will-change: opacity; }

Expand Down
24 changes: 20 additions & 4 deletions dist/photoswipe.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*! PhotoSwipe - v4.1.1 - 2015-12-24
/*! PhotoSwipe - v4.1.2 - 2017-04-05
* http://photoswipe.com
* Copyright (c) 2015 Dmitry Semenov; */
* Copyright (c) 2017 Dmitry Semenov; */
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define(factory);
Expand Down Expand Up @@ -397,6 +397,8 @@ var _isOpen,
_features,
_windowVisibleSize = {},
_renderMaxResolution = false,
_orientationChangeTimeout,


// Registers PhotoSWipe module (History, Controller ...)
_registerModule = function(name, module) {
Expand Down Expand Up @@ -544,13 +546,13 @@ var _isOpen,
framework.bind(document, 'mousemove', _onFirstMouseMove);
}

framework.bind(window, 'resize scroll', self);
framework.bind(window, 'resize scroll orientationchange', self);

_shout('bindEvents');
},

_unbindEvents = function() {
framework.unbind(window, 'resize', self);
framework.unbind(window, 'resize scroll orientationchange', self);
framework.unbind(window, 'scroll', _globalEventHandlers.scroll);
framework.unbind(document, 'keydown', self);
framework.unbind(document, 'mousemove', _onFirstMouseMove);
Expand All @@ -563,6 +565,8 @@ var _isOpen,
framework.unbind(window, _upMoveEvents, self);
}

clearTimeout(_orientationChangeTimeout);

_shout('unbindEvents');
},

Expand Down Expand Up @@ -841,6 +845,18 @@ var publicMethods = {
// Setup global events
_globalEventHandlers = {
resize: self.updateSize,

// Fixes: iOS 10.3 resize event
// does not update scrollWrap.clientWidth instantly after resize
// https://github.com/dimsemenov/PhotoSwipe/issues/1315
orientationchange: function() {
clearTimeout(_orientationChangeTimeout);
_orientationChangeTimeout = setTimeout(function() {
if(_viewportSize.x !== self.scrollWrap.clientWidth) {
self.updateSize();
}
}, 500);
},
scroll: _updatePageScrollOffset,
keydown: _onKeyDown,
click: _onGlobalClick
Expand Down
6 changes: 3 additions & 3 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.1.1",
"version": "4.1.2",
"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.1.1",
"version": "4.1.2",
"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.1.1</a></h1>
<h1>PhotoSwipe<a href="https://github.com/dimsemenov/PhotoSwipe/releases"> v4.1.2</a></h1>
<p>JavaScript gallery, no dependencies.</p>
</div>

Expand Down

0 comments on commit b6fdb82

Please sign in to comment.