Permalink
Browse files

v2.0.3

  • Loading branch information...
1 parent 06502c9 commit 119cbe4b36626dc11cf932dc4066c58774357261 codecomputerlove committed Aug 22, 2011
View
@@ -11,9 +11,19 @@ PhotoSwipe also runs on the desktop and has been tested on Chrome, Firefox, Safa
-Latest Release v2.0.2
+Latest Release v2.0.3
---------------------
-[Download](http://github.com/downloads/codecomputerlove/PhotoSwipe/code.photoswipe-2.0.2.zip)
+[Download](http://github.com/downloads/codecomputerlove/PhotoSwipe/code.photoswipe-2.0.3.zip)
+
+**Changes for 2.0.3**
+
+- Fixed orientation issue when adding to a homescreen on iOS devices
+
+- Setting fadeSpeed values to zero will stop any fading in / out and will show / hide instantly
+
+- Zoom now works again on IE9
+
+- Modified css to set the contents of the caption to be inline by default
**Changes for 2.0.2**
View
@@ -5,7 +5,7 @@
project.description = PhotoSwipe
project.src.dir = src
-project.build.version = 2.0.2
+project.build.version = 2.0.3
project.build.year = 2011
project.build.workdir = work
@@ -68,7 +68,7 @@ div.ps-caption
font-family: "Lucida Grande", Helvetica, Arial,Verdana, sans-serif;
text-align: center;
}
-div.ps-caption * { display: block; }
+div.ps-caption * { display: inline; }
div.ps-caption-bottom
{
View
@@ -13,11 +13,23 @@ Initial release
- Fixed issue with the cache which on certain occassions would lead to images not loading or reloading
-2.0.1 19.08.11 - Ste Brennan
+2.0.2 19.08.11 - Ste Brennan
----------------------------
- You can now give your PhotoSwipe instances IDs
- Re-written how the jQuery Mobile demo so that it is now based on PhotoSwipe instance IDs
- Fixed back button issue with jQuery Mobile demo
+
+
+2.0.3 22.08.11 - Ste Brennan
+----------------------------
+
+- Fixed orientation issue when adding to a homescreen on iOS devices
+
+- Setting fadeSpeed values to zero will stop any fading in / out and will show / hide instantly
+
+- Zoom now works again on IE9
+
+- Modified css to set the contents of the caption to be inline by default
@@ -329,12 +329,17 @@
// For some reason, resize was more stable than orientationchange in Android
this.orientationEventName = 'resize';
}
+ else if (Util.Browser.iOS && (!Util.Browser.safari)){
+ Util.Events.add(window.document.body, 'orientationchange', this.windowOrientationChangeHandler);
+ }
else{
var supportsOrientationChange = !Util.isNothing(window.onorientationchange);
this.orientationEventName = supportsOrientationChange ? 'orientationchange' : 'resize';
}
- Util.Events.add(window, this.orientationEventName, this.windowOrientationChangeHandler);
+ if (!Util.isNothing(this.orientationEventName)){
+ Util.Events.add(window, this.orientationEventName, this.windowOrientationChangeHandler);
+ }
Util.Events.add(window, 'scroll', this.windowScrollHandler);
if (this.settings.enableKeyboard){
@@ -383,7 +388,14 @@
*/
removeEventHandlers: function(){
- Util.Events.remove(window, this.orientationEventName, this.windowOrientationChangeHandler);
+ if (Util.Browser.iOS && (!Util.Browser.safari)){
+ Util.Events.remove(window.document.body, 'orientationchange', this.windowOrientationChangeHandler);
+ }
+
+ if (!Util.isNothing(this.orientationEventName)){
+ Util.Events.remove(window, this.orientationEventName, this.windowOrientationChangeHandler);
+ }
+
Util.Events.remove(window, 'scroll', this.windowScrollHandler);
if (this.settings.enableKeyboard){
@@ -600,7 +612,15 @@
*/
canUserZoom: function(){
- if (!Util.Browser.isCSSTransformSupported){
+ var testEl, cacheImage;
+
+ if (Util.Browser.msie){
+ testEl = document.createElement('div');
+ if (Util.isNothing(testEl.style.msTransform)){
+ return false;
+ }
+ }
+ else if (!Util.Browser.isCSSTransformSupported){
return false;
}
@@ -612,7 +632,7 @@
return false;
}
- var cacheImage = this.cache.images[this.currentIndex];
+ cacheImage = this.cache.images[this.currentIndex];
if (Util.isNothing(cacheImage)){
return false;
View
@@ -74,6 +74,14 @@
*/
fadeIn: function(el, speed, callback, timingFunction){
+ if (speed <= 0){
+ Util.DOM.setStyle(el, 'opacity', 1);
+ if (!Util.isNothing(callback)){
+ callback(el);
+ return;
+ }
+ }
+
var opacity = Util.DOM.getStyle(el, 'opacity');
if (opacity >= 1){
@@ -100,6 +108,14 @@
*/
fadeOut: function(el, speed, callback, timingFunction){
+ if (speed <= 0){
+ Util.DOM.setStyle(el, 'opacity', 0);
+ if (!Util.isNothing(callback)){
+ callback(el);
+ return;
+ }
+ }
+
if (Util.Browser.isCSSTransformSupported){
this._applyTransition(el, 'opacity', 0, speed, callback, timingFunction);
View
@@ -8,6 +8,7 @@
ua: null,
version: null,
+ safari: null,
webkit: null,
opera: null,
msie: null,
@@ -18,6 +19,7 @@
blackberry: null,
iPad: null,
iPhone: null,
+ iPod: null,
iOS: null,
is3dSupported: null,
@@ -30,21 +32,22 @@
this.ua = window.navigator.userAgent;
this.version = (this.ua.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || []);
+ this.safari = (/Safari/gi).test(window.navigator.appVersion);
this.webkit = /webkit/i.test(this.ua);
this.opera = /opera/i.test(this.ua);
this.msie = /msie/i.test(this.ua) && !this.opera;
this.chrome = /Chrome/i.test(this.ua);
this.mozilla = /mozilla/i.test(this.ua) && !/(compatible|webkit)/.test(this.ua);
this.android = /android/i.test(this.ua);
this.blackberry = /blackberry/i.test(this.ua);
- this.iPad = /(iPad).*OS\s([\d_]+)/.test(this.ua);
- this.iPhone = !this.ipad && /(iPhone\sOS)\s([\d_]+)/.test(this.ua);
- this.iOS = this.iPad || this.iPhone;
+ this.iOS = (/iphone|ipod|ipad/gi).test(window.navigator.platform);
+ this.iPad = (/ipad/gi).test(window.navigator.platform);
+ this.iPhone = (/iphone/gi).test(window.navigator.platform);
+ this.iPod = (/ipod/gi).test(window.navigator.platform);
var testEl = document.createElement('div');
this.is3dSupported = !Util.isNothing(testEl.style.WebkitPerspective);
- this.isCSSTransformSupported = ( !Util.isNothing(testEl.style.WebkitTransform) || !Util.isNothing(testEl.style.MozTransform) || !Util.isNothing(testEl.style.transformProperty) );
- //!Util.isNothing(testEl.style.msTransform)
+ this.isCSSTransformSupported = ( !Util.isNothing(testEl.style.WebkitTransform) || !Util.isNothing(testEl.style.MozTransform) || !Util.isNothing(testEl.style.transformProperty) );
this.isTouchSupported = this.isEventSupported('touchstart');
this.isGestureSupported = this.isEventSupported('gesturestart');
@@ -3,6 +3,7 @@
<title>PhotoSwipe</title>
<meta name="author" content="Code Computerlove - http://www.codecomputerlove.com/" />
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
+ <meta name="apple-mobile-web-app-capable" content="yes" />
<link href="styles.css" type="text/css" rel="stylesheet" />
<link href="../photoswipe.css" type="text/css" rel="stylesheet" />
@@ -3,6 +3,7 @@
<title>PhotoSwipe</title>
<meta name="author" content="Code Computerlove - http://www.codecomputerlove.com/" />
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
+ <meta name="apple-mobile-web-app-capable" content="yes" />
<link href="styles.css" type="text/css" rel="stylesheet" />
<link href="../photoswipe.css" type="text/css" rel="stylesheet" />
@@ -3,6 +3,7 @@
<title>PhotoSwipe</title>
<meta name="author" content="Code Computerlove - http://www.codecomputerlove.com/" />
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
+ <meta name="apple-mobile-web-app-capable" content="yes" />
<link href="styles.css" type="text/css" rel="stylesheet" />
<link href="../photoswipe.css" type="text/css" rel="stylesheet" />
@@ -3,6 +3,7 @@
<title>PhotoSwipe</title>
<meta name="author" content="Code Computerlove - http://www.codecomputerlove.com/" />
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
+ <meta name="apple-mobile-web-app-capable" content="yes" />
<link href="../lib/jquery.mobile-1.0b2/jquery.mobile-1.0b2.min.css" rel="stylesheet" />
<link href="jquery-mobile.css" type="text/css" rel="stylesheet" />
@@ -3,6 +3,7 @@
<title>PhotoSwipe</title>
<meta name="author" content="Code Computerlove - http://www.codecomputerlove.com/" />
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
+ <meta name="apple-mobile-web-app-capable" content="yes" />
<link href="../lib/jquery.mobile-1.0b2/jquery.mobile-1.0b2.min.css" rel="stylesheet" />
<link href="jquery-mobile.css" type="text/css" rel="stylesheet" />
@@ -3,6 +3,8 @@
<title>PhotoSwipe</title>
<meta name="author" content="Code Computerlove - http://www.codecomputerlove.com/" />
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
+ <meta name="apple-mobile-web-app-capable" content="yes" />
+
<link href="styles.css" type="text/css" rel="stylesheet" />
<link href="../photoswipe.css" type="text/css" rel="stylesheet" />
@@ -3,6 +3,8 @@
<title>PhotoSwipe</title>
<meta name="author" content="Code Computerlove - http://www.codecomputerlove.com/" />
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
+ <meta name="apple-mobile-web-app-capable" content="yes" />
+
<link href="styles.css" type="text/css" rel="stylesheet" />
<link href="../photoswipe.css" type="text/css" rel="stylesheet" />
@@ -3,6 +3,8 @@
<title>PhotoSwipe</title>
<meta name="author" content="Code Computerlove - http://www.codecomputerlove.com/" />
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
+ <meta name="apple-mobile-web-app-capable" content="yes" />
+
<link href="styles.css" type="text/css" rel="stylesheet" />
<link href="../photoswipe.css" type="text/css" rel="stylesheet" />
@@ -3,6 +3,8 @@
<title>PhotoSwipe</title>
<meta name="author" content="Code Computerlove - http://www.codecomputerlove.com/" />
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
+ <meta name="apple-mobile-web-app-capable" content="yes" />
+
<link href="styles.css" type="text/css" rel="stylesheet" />
<link href="../photoswipe.css" type="text/css" rel="stylesheet" />
@@ -3,6 +3,7 @@
<title>PhotoSwipe</title>
<meta name="author" content="Code Computerlove - http://www.codecomputerlove.com/" />
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
+ <meta name="apple-mobile-web-app-capable" content="yes" />
<link href="../lib/jquery.mobile-1.0b2/jquery.mobile-1.0b2.min.css" rel="stylesheet" />
<link href="jquery-mobile.css" type="text/css" rel="stylesheet" />
@@ -3,6 +3,8 @@
<title>PhotoSwipe</title>
<meta name="author" content="Code Computerlove - http://www.codecomputerlove.com/" />
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
+ <meta name="apple-mobile-web-app-capable" content="yes" />
+
<link href="styles.css" type="text/css" rel="stylesheet" />
<link href="../assets/photoswipe.css" type="text/css" rel="stylesheet" />
View
@@ -3,6 +3,8 @@
<title>PhotoSwipe</title>
<meta name="author" content="Code Computerlove - http://www.codecomputerlove.com/" />
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
+ <meta name="apple-mobile-web-app-capable" content="yes" />
+
<link href="styles.css" type="text/css" rel="stylesheet" />
<link href="../assets/photoswipe.css" type="text/css" rel="stylesheet" />

0 comments on commit 119cbe4

Please sign in to comment.