Browse files

v2.1.2

  • Loading branch information...
1 parent 1857307 commit d5b2c0d664e40bca9eda806b69b5731c39b4080b codecomputerlove committed Sep 19, 2011
View
20 README.md
@@ -11,25 +11,15 @@ PhotoSwipe also runs on the desktop and has been tested on Chrome, Firefox, Safa
-Latest Release v2.1.1
+Latest Release v2.1.2
---------------------
-[Download](http://github.com/downloads/codecomputerlove/PhotoSwipe/code.photoswipe-2.1.1.zip)
+[Download](http://github.com/downloads/codecomputerlove/PhotoSwipe/code.photoswipe-2.1.2.zip)
-**Changes for 2.1.1**
+**Changes for 2.1.2**
-- Upgraded libraries tp jQuery 1.6.3, jQueryMobile 1.0b3, Code.Util 1.0.3
+- Modified how PhotoSwipe is initiated within jQuery Mobile projects. Fixes issue reported especially with "05-jquery-mobile-ajax.html" examples. Check it out.
-- Two new examples: '10-image-meta-data.html' and '11-custom-captions.html'
-
-- Fixed issue when hitting the back button or escape key when zoomed in
-
-- Fixed issue 112 & 79 relating to images not showing
-
-- Fixed bug when closing PhotoSwipe when user has zoomed in on image
-
-- Added new events: onBeforeZoomPanRotateShow, onZoomPanRotateShow, onBeforeZoomPanRotateHide, onZoomPanRotateHide, onZoomPanRotateTransform
-
-- Better handling when images are not found
+- Stopped core functions like "play()", "next()", "previous()" etc. running when the zoom layer is displayed. This could happen especially if using keyboard controls.
**Important notes about v2**
View
2 build.properties
@@ -5,7 +5,7 @@
project.description = PhotoSwipe
project.src.dir = src
-project.build.version = 2.1.1
+project.build.version = 2.1.2
project.build.year = 2011
project.build.workdir = work
View
8 build.xml
@@ -206,6 +206,14 @@
<param name="filePath" value="${project.build.workdir}/examples/11-custom-captions.html"/>
</antcall>
+ <antcall target="versionStamp">
+ <param name="filePath" value="${project.build.workdir}/examples/ajax-gallery1.html"/>
+ </antcall>
+
+ <antcall target="versionStamp">
+ <param name="filePath" value="${project.build.workdir}/examples/ajax-gallery2.html"/>
+ </antcall>
+
</target>
View
12 src/change.log
@@ -62,3 +62,15 @@ Initial release
- Better handling when images are not found
+
+2.1.2 19.09.11 - Ste Brennan
+----------------------------
+
+- Modified how PhotoSwipe is initiated within jQuery Mobile projects. Fixes issue reported especially with "05-jquery-mobile-ajax.html" examples. Check it out.
+
+- Stopped core functions like "play()", "next()", "previous()" etc. running when the zoom layer is displayed. This could happen especially if using keyboard controls.
+
+
+
+
+
View
45 src/examples/04-jquery-mobile.html
@@ -27,29 +27,32 @@
$(document).ready(function(){
-
- $('div.gallery-page').live('pageshow', function(e){
+ $('div.gallery-page')
+ .live('pageshow', function(e){
- // See if there is a PhotoSwipe instance associated with the page.
- // For this demo I've assumed one page has one instance and the ID
- // for each instance is the same as the page ID.
- //
- // Of course, it's up to you how many instances per page and what
- // ID naming convention you use!
- var
- currentPage = $(e.target),
- photoSwipeInstanceId = currentPage.attr('id'),
- photoSwipeInstance = PhotoSwipe.getInstance(photoSwipeInstanceId)
- options = {};
-
- if (typeof photoSwipeInstance === "undefined" || photoSwipeInstance === null) {
- photoSwipeInstance = $("ul.gallery a", e.target).photoSwipe(options, photoSwipeInstanceId);
- }
-
- return true;
-
- })
+ var
+ currentPage = $(e.target),
+ options = {},
+ photoSwipeInstance = $("ul.gallery a", e.target).photoSwipe(options, currentPage.attr('id'));
+
+ return true;
+
+ })
+ .live('pagehide', function(e){
+
+ var
+ currentPage = $(e.target),
+ photoSwipeInstance = PhotoSwipe.getInstance(currentPage.attr('id'));
+
+ if (typeof photoSwipeInstance != "undefined" && photoSwipeInstance != null) {
+ PhotoSwipe.detatch(photoSwipeInstance);
+ }
+
+ return true;
+
+ });
+
});
}(window, window.jQuery, window.Code.PhotoSwipe));
View
45 src/examples/05-jquery-mobile-ajax.html
@@ -27,29 +27,32 @@
$(document).ready(function(){
-
- $('div.gallery-page').live('pageshow', function(e){
+ $('div.gallery-page')
+ .live('pageshow', function(e){
- // See if there is a PhotoSwipe instance associated with the page.
- // For this demo I've assumed one page has one instance and the ID
- // for each instance is the same as the page ID.
- //
- // Of course, it's up to you how many instances per page and what
- // ID naming convention you use!
- var
- currentPage = $(e.target),
- photoSwipeInstanceId = currentPage.attr('id'),
- photoSwipeInstance = PhotoSwipe.getInstance(photoSwipeInstanceId)
- options = {};
-
- if (typeof photoSwipeInstance === "undefined" || photoSwipeInstance === null) {
- photoSwipeInstance = $("ul.gallery a", e.target).photoSwipe(options, photoSwipeInstanceId);
- }
-
- return true;
-
- })
+ var
+ currentPage = $(e.target),
+ options = {},
+ photoSwipeInstance = $("ul.gallery a", e.target).photoSwipe(options, currentPage.attr('id'));
+
+ return true;
+
+ })
+ .live('pagehide', function(e){
+
+ var
+ currentPage = $(e.target),
+ photoSwipeInstance = PhotoSwipe.getInstance(currentPage.attr('id'));
+
+ if (typeof photoSwipeInstance != "undefined" && photoSwipeInstance != null) {
+ PhotoSwipe.detatch(photoSwipeInstance);
+ }
+
+ return true;
+
+ });
+
});
}(window, window.jQuery, window.Code.PhotoSwipe));
View
51 src/examples/debug-jquery-mobile.html
@@ -9,6 +9,10 @@
<link href="jquery-mobile.css" type="text/css" rel="stylesheet" />
<link href="../assets/photoswipe.css" type="text/css" rel="stylesheet" />
+ <!--
+ <script src="http://192.168.0.98:8888/target/target-script-min.js#anonymous"></script>
+ -->
+
<script type="text/javascript" src="../lib/klass.min.js"></script>
<script type="text/javascript" src="../lib/jquery-1.6.3.min.js"></script>
<script type="text/javascript" src="../lib/jquery.mobile-1.0b3/jquery.mobile-1.0b3.min.js"></script>
@@ -45,35 +49,36 @@
$(document).ready(function(){
-
- $('div.gallery-page').live('pageshow', function(e){
+ $('div.gallery-page')
+ .live('pageshow', function(e){
- // See if there is a PhotoSwipe instance associated with the page.
- // For this demo I've assumed one page has one instance and the ID
- // for each instance is the same as the page ID.
- //
- // Of course, it's up to you how many instances per page and what
- // ID naming convention you use!
- var
- currentPage = $(e.target),
- photoSwipeInstanceId = currentPage.attr('id'),
- photoSwipeInstance = PhotoSwipe.getInstance(photoSwipeInstanceId)
- options = {};
-
- if (typeof photoSwipeInstance === "undefined" || photoSwipeInstance === null) {
- console.log('creating');
- photoSwipeInstance = $("ul.gallery a", e.target).photoSwipe(options, photoSwipeInstanceId);
- }
-
- return true;
-
- })
+ var
+ currentPage = $(e.target),
+ options = {},
+ photoSwipeInstance = $("ul.gallery a", e.target).photoSwipe(options, currentPage.attr('id'));
+
+ return true;
+
+ })
+ .live('pagehide', function(e){
+
+ var
+ currentPage = $(e.target),
+ photoSwipeInstance = PhotoSwipe.getInstance(currentPage.attr('id'));
+
+ if (typeof photoSwipeInstance != "undefined" && photoSwipeInstance != null) {
+ PhotoSwipe.detatch(photoSwipeInstance);
+ }
+
+ return true;
+
+ });
+
});
}(window, window.jQuery, window.Code.PhotoSwipe));
-
</script>
</head>
View
4 src/examples/debug-jquery.html
@@ -9,6 +9,10 @@
<link href="../assets/photoswipe.css" type="text/css" rel="stylesheet" />
+ <!--
+ <script src="http://192.168.0.98:8888/target/target-script-min.js#anonymous"></script>
+ -->
+
<script type="text/javascript" src="../lib/klass.min.js"></script>
<script type="text/javascript" src="../lib/jquery-1.6.3.min.js"></script>
<script type="text/javascript" src="../lib/code.util-1.0.3/code.util.jquery-1.0.3.js"></script>
View
4 src/examples/debug.html
@@ -9,6 +9,10 @@
<link href="../assets/photoswipe.css" type="text/css" rel="stylesheet" />
+ <!--
+ <script src="http://192.168.0.98:8888/target/target-script-min.js#anonymous"></script>
+ -->
+
<script type="text/javascript" src="../lib/klass.min.js"></script>
<script type="text/javascript" src="../lib/code.util-1.0.3/code.util-1.0.3.js"></script>
View
26 src/photoswipe.class.js
@@ -536,6 +536,10 @@
*/
play: function(){
+ if (this.isZoomActive()){
+ return;
+ }
+
if (!this.settings.preventSlideshow){
if (!Util.isNothing(this.carousel)){
this.fadeOutToolbarIfVisible();
@@ -551,7 +555,11 @@
* Function: stop
*/
stop: function(){
-
+
+ if (this.isZoomActive()){
+ return;
+ }
+
if (!Util.isNothing(this.carousel)){
this.carousel.stopSlideshow();
}
@@ -564,7 +572,11 @@
* Function: previous
*/
previous: function(){
-
+
+ if (this.isZoomActive()){
+ return;
+ }
+
if (!Util.isNothing(this.carousel)){
this.carousel.previous();
}
@@ -577,7 +589,11 @@
* Function: next
*/
next: function(){
-
+
+ if (this.isZoomActive()){
+ return;
+ }
+
if (!Util.isNothing(this.carousel)){
this.carousel.next();
}
@@ -591,6 +607,10 @@
*/
toggleToolbar: function(){
+ if (this.isZoomActive()){
+ return;
+ }
+
if (!Util.isNothing(this.toolbar)){
this.toolbar.toggleVisibility(this.currentIndex);
}

0 comments on commit d5b2c0d

Please sign in to comment.