photoswipe-rails 4.1.1 → 4.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3fbe868e3d71b5f5d51761e035eefaf4a3570292
4
- data.tar.gz: fbafac179c17755ca8b30f5f4c44473463e87bf5
3
+ metadata.gz: 6dc5d42aefe356c69a820873819f8ab97b87a2f0
4
+ data.tar.gz: 57d58f517d51e5ff19731ae1e66eb5a52713b806
5
5
  SHA512:
6
- metadata.gz: 8a189b48369ba17e4f6f04a6c2b256b4a3aac9e3c8e841ddfb565e7dcdf959add6cee375933ff4c64366549a4b7eff932f582242bdb9bbaf17c76a0d82aeb4fd
7
- data.tar.gz: fa0aca9901eac7578769a6a572383241f5d4a1fd45aad97f66ecadc20832369014139f17b14592ad89d6789a279f641c32682116bdfe3a14e8d2587b1017f153
6
+ metadata.gz: 72aad2eda23f62eb57a3cf239cdb09d85a101b7f12dadbf844cf3fc734ca98ec79362ba15373ef1b7d347984a7273d1a12998c37ff372e378f8b81479da59cfc
7
+ data.tar.gz: 5fd8a95f837d528f19dc30024c5e41fa065a6db06dfcd54b128038516df706183bfee07ad4c3844149c917404e38e1c4ee27173b1c8d777a665411e3a3c950dc
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # photoswipe-rails
1
+ # photoswipe-rails [![Gem Version](https://badge.fury.io/rb/photoswipe-rails.svg)](https://badge.fury.io/rb/photoswipe-rails)
2
2
 
3
3
  [PhotoSwipe](http://photoswipe.com/) for the Rails asset pipeline.
4
4
 
@@ -1,6 +1,6 @@
1
- /*! PhotoSwipe Default UI - 4.1.1 - 2015-12-24
1
+ /*! PhotoSwipe Default UI - 4.1.2 - 2017-04-05
2
2
  * http://photoswipe.com
3
- * Copyright (c) 2015 Dmitry Semenov; */
3
+ * Copyright (c) 2017 Dmitry Semenov; */
4
4
  /**
5
5
  *
6
6
  * UI on top of main sliding area (caption, arrows, close button, etc.).
@@ -1,6 +1,6 @@
1
- /*! PhotoSwipe - v4.1.1 - 2015-12-24
1
+ /*! PhotoSwipe - v4.1.2 - 2017-04-05
2
2
  * http://photoswipe.com
3
- * Copyright (c) 2015 Dmitry Semenov; */
3
+ * Copyright (c) 2017 Dmitry Semenov; */
4
4
  (function (root, factory) {
5
5
  if (typeof define === 'function' && define.amd) {
6
6
  define(factory);
@@ -397,6 +397,8 @@ var _isOpen,
397
397
  _features,
398
398
  _windowVisibleSize = {},
399
399
  _renderMaxResolution = false,
400
+ _orientationChangeTimeout,
401
+
400
402
 
401
403
  // Registers PhotoSWipe module (History, Controller ...)
402
404
  _registerModule = function(name, module) {
@@ -544,13 +546,13 @@ var _isOpen,
544
546
  framework.bind(document, 'mousemove', _onFirstMouseMove);
545
547
  }
546
548
 
547
- framework.bind(window, 'resize scroll', self);
549
+ framework.bind(window, 'resize scroll orientationchange', self);
548
550
 
549
551
  _shout('bindEvents');
550
552
  },
551
553
 
552
554
  _unbindEvents = function() {
553
- framework.unbind(window, 'resize', self);
555
+ framework.unbind(window, 'resize scroll orientationchange', self);
554
556
  framework.unbind(window, 'scroll', _globalEventHandlers.scroll);
555
557
  framework.unbind(document, 'keydown', self);
556
558
  framework.unbind(document, 'mousemove', _onFirstMouseMove);
@@ -563,6 +565,8 @@ var _isOpen,
563
565
  framework.unbind(window, _upMoveEvents, self);
564
566
  }
565
567
 
568
+ clearTimeout(_orientationChangeTimeout);
569
+
566
570
  _shout('unbindEvents');
567
571
  },
568
572
 
@@ -841,6 +845,18 @@ var publicMethods = {
841
845
  // Setup global events
842
846
  _globalEventHandlers = {
843
847
  resize: self.updateSize,
848
+
849
+ // Fixes: iOS 10.3 resize event
850
+ // does not update scrollWrap.clientWidth instantly after resize
851
+ // https://github.com/dimsemenov/PhotoSwipe/issues/1315
852
+ orientationchange: function() {
853
+ clearTimeout(_orientationChangeTimeout);
854
+ _orientationChangeTimeout = setTimeout(function() {
855
+ if(_viewportSize.x !== self.scrollWrap.clientWidth) {
856
+ self.updateSize();
857
+ }
858
+ }, 500);
859
+ },
844
860
  scroll: _updatePageScrollOffset,
845
861
  keydown: _onKeyDown,
846
862
  click: _onGlobalClick
@@ -35,8 +35,7 @@
35
35
  transition: opacity 0.2s;
36
36
  -webkit-box-shadow: none;
37
37
  box-shadow: none; }
38
- .pswp__button:focus,
39
- .pswp__button:hover {
38
+ .pswp__button:focus, .pswp__button:hover {
40
39
  opacity: 1; }
41
40
  .pswp__button:active {
42
41
  outline: none;
@@ -66,6 +66,8 @@
66
66
  height: 100%;
67
67
  background: #000;
68
68
  opacity: 0;
69
+ -webkit-transform: translateZ(0);
70
+ transform: translateZ(0);
69
71
  -webkit-backface-visibility: hidden;
70
72
  will-change: opacity; }
71
73
 
@@ -1,3 +1,3 @@
1
1
  module PhotoSwipe
2
- VERSION = '4.1.1'
2
+ VERSION = '4.1.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: photoswipe-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.1
4
+ version: 4.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kristaps Karlsons
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-02-12 00:00:00.000000000 Z
12
+ date: 2017-04-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
82
  version: '0'
83
83
  requirements: []
84
84
  rubyforge_project:
85
- rubygems_version: 2.4.7
85
+ rubygems_version: 2.6.4
86
86
  signing_key:
87
87
  specification_version: 4
88
88
  summary: Adds PhotoSwipe to your Rails asset pipeline