Permalink
Browse files

v1.0.18

  • Loading branch information...
codecomputerlove
codecomputerlove committed Jul 8, 2011
1 parent 4ce5531 commit 612f9ef451a6c9ea5dcf44a68f3f7dbc29658c11
View
@@ -10,11 +10,19 @@ The current version supports mobile handsets running WebKit based browsers, i.e.
PhotoSwipe also runs on the desktop and has been tested on Chrome, Firefox, Safari and Internet Explorer 8 and above.
-Latest Release v1.0.17
+Latest Release v1.0.18
----------------------
-[Download](http://github.com/downloads/codecomputerlove/PhotoSwipe/code-photoswipe.v1.0.17.zip)
+[Download](http://github.com/downloads/codecomputerlove/PhotoSwipe/code-photoswipe.v1.0.18.zip)
-- Fixed issues with "events.html" example
+- Now sized correctly if your HTML body has padding on it
+
+- Fixed issued with jQuery and listening to PhotoSwipe events - was throwing up a "too much recursion" error
+
+- Have had to change the way you listen to events. Use "Code.PhotoSwipe.Current.addEventHandler" not Code.PhotoSwipe.Current.addEventListener. This is related to the above fix
+
+- Upgraded to jQuery 1.6.2
+
+- Upgraded to jQuery Animate Enhanced v0.76
Features
View
@@ -5,7 +5,7 @@
project.description = PhotoSwipe
project.src.dir = src
-project.build.version = 1.0.17
+project.build.version = 1.0.18
project.build.year = 2011
project.build.workdir = work
View
@@ -111,7 +111,7 @@
}
Util.DOM.setStyle(this.el, 'top', top + 'px');
- Util.DOM.width(this.el, Util.DOM.bodyWidth());
+ Util.DOM.width(this.el, Util.DOM.bodyOuterWidth());
},
View
@@ -141,7 +141,7 @@ Major update:
- Should now play nicely if including MooTools thanks to chameron [https://github.com/chameron]
-1.0.12 09.06.12 - Ste Brennan
+1.0.12 09.06.11 - Ste Brennan
-----------------------------
- Fixed issues with Chrome 12
@@ -157,39 +157,55 @@ Major update:
- Updated to jQuery Animate Enhanced v0.75
-1.0.13 09.06.22 - Ste Brennan
+1.0.13 09.06.11 - Ste Brennan
-----------------------------
- Upgraded to jQuery Mobile 1.0 beta
- Added new "double tap" feature. Double tapping an image will zoom the image in and allow the user to pan around. This is still experimental and works on iOS (pinch and zoom still works), Android, BlackBerry, Chrome and Firefox 4 and above
-1.0.14 24.06.22 - Ste Brennan
+1.0.14 24.06.11 - Ste Brennan
-----------------------------
- "Double tap" to zoom and pan around an image now working in IE9
- Major rewrite of how events are handled internally.
-1.0.15 02.07.22 - Ste Brennan
+1.0.15 02.07.11 - Ste Brennan
-----------------------------
- Fixed issues with new event handler. Keyboard control should work again in the non-jQuery version
- Added change to a resuse issue reported with jQuery Mobile
-1.0.16 05.07.22 - Ste Brennan
+1.0.16 05.07.11 - Ste Brennan
-----------------------------
- Added new option to the imageScaleMethod setting "fitNoUpscale". This will ensure the image fits into the viewport but it won't upscale the image
- Added new example "jquery-mobile-ajax.html"
-1.0.17 05.07.22 - Ste Brennan
+1.0.17 05.07.11 - Ste Brennan
-----------------------------
- Fixed issues with "events.html" example
+
+
+1.0.18 08.07.11 - Ste Brennan
+-----------------------------
+
+- Now sized correctly if your HTML body has padding on it
+
+- Fixed issued with jQuery and listening to PhotoSwipe events - was throwing up a "too much recursion" error
+
+- Have had to change the way you listen to events. Use "Code.PhotoSwipe.Current.addEventHandler" not Code.PhotoSwipe.Current.addEventListener. This is related to the above fix
+
+- Upgraded to jQuery 1.6.2
+
+- Upgraded to jQuery Animate Enhanced v0.76
+
+
@@ -43,8 +43,12 @@
resetPosition: function(){
// Set the height and width to fill the document
- Util.DOM.width(this.el, Util.DOM.bodyWidth());
- Util.DOM.height(this.el, Util.DOM.bodyHeight());
+ Util.DOM.width(this.el, Util.DOM.bodyOuterWidth());
+ var newHeight = Util.DOM.bodyOuterHeight();
+ if (Util.DOM.windowHeight > newHeight){
+ newHeight = Util.DOM.windowHeight;
+ }
+ Util.DOM.height(this.el, newHeight);
}
View
@@ -17,7 +17,7 @@
<script type="text/javascript" src="../util-animation.js"></script>
<!--
- <script type="text/javascript" src="../lib/jquery-1.6.1.min.js"></script>
+ <script type="text/javascript" src="../lib/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="../lib/jquery.animate-enhanced.min.js"></script>
<script type="text/javascript" src="../util-dom-jQuery.js"></script>
<script type="text/javascript" src="../util-events-jQuery.js"></script>
@@ -47,115 +47,118 @@
"/src/examples/debug.html"
*/
-
- // Set up PhotoSwipe with all anchor tags in the Gallery container
- document.addEventListener('DOMContentLoaded', function(){
+
+ // Here we are using the "Code.PhotoSwipe.Util.Events.domReady" function
+ // to set the DOM ready event handler.
+ // You could quite easily use $(document).ready() or document.addEventListener
+ // as Code.PhotoSwipe.Util.Events.domReady is just a warpper for these
+ Code.PhotoSwipe.Util.Events.domReady(function(e){
var addEventListeners = true;
if (addEventListeners){
// Add event listeners
// onBeforeShow
- Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onBeforeShow, function(e){
+ Code.PhotoSwipe.Current.addEventHandler(Code.PhotoSwipe.EventTypes.onBeforeShow, function(e){
console.log('onBeforeShow');
});
// onShow
- Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onShow, function(e){
+ Code.PhotoSwipe.Current.addEventHandler(Code.PhotoSwipe.EventTypes.onShow, function(e){
console.log('onShow');
});
// onBeforeHide
- Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onBeforeHide, function(e){
+ Code.PhotoSwipe.Current.addEventHandler(Code.PhotoSwipe.EventTypes.onBeforeHide, function(e){
console.log('onBeforeHide');
});
// onHide
- Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onHide, function(e){
+ Code.PhotoSwipe.Current.addEventHandler(Code.PhotoSwipe.EventTypes.onHide, function(e){
console.log('onHide');
});
// onShowNext
- Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onShowNext, function(e){
+ Code.PhotoSwipe.Current.addEventHandler(Code.PhotoSwipe.EventTypes.onShowNext, function(e){
console.log('onShowNext');
});
// onShowPrevious
- Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onShowPrevious, function(e){
+ Code.PhotoSwipe.Current.addEventHandler(Code.PhotoSwipe.EventTypes.onShowPrevious, function(e){
console.log('onShowPrevious');
});
// onDisplayImage
- Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onDisplayImage, function(e){
+ Code.PhotoSwipe.Current.addEventHandler(Code.PhotoSwipe.EventTypes.onDisplayImage, function(e){
console.log('onDisplayImage');
});
// onResetPosition
- Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onResetPosition, function(e){
+ Code.PhotoSwipe.Current.addEventHandler(Code.PhotoSwipe.EventTypes.onResetPosition, function(e){
console.log('onResetPosition');
});
// onSlideshowStart
- Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onSlideshowStart, function(e){
+ Code.PhotoSwipe.Current.addEventHandler(Code.PhotoSwipe.EventTypes.onSlideshowStart, function(e){
console.log('onSlideshowStart');
});
// onSlideshowStop
- Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onSlideshowStop, function(e){
+ Code.PhotoSwipe.Current.addEventHandler(Code.PhotoSwipe.EventTypes.onSlideshowStop, function(e){
console.log('onSlideshowStop');
});
// onBeforeCaptionAndToolbarShow
- Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onBeforeCaptionAndToolbarShow, function(e){
+ Code.PhotoSwipe.Current.addEventHandler(Code.PhotoSwipe.EventTypes.onBeforeCaptionAndToolbarShow, function(e){
console.log('onBeforeCaptionAndToolbarShow');
});
// onBeforeCaptionAndToolbarHide
- Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onBeforeCaptionAndToolbarHide, function(e){
+ Code.PhotoSwipe.Current.addEventHandler(Code.PhotoSwipe.EventTypes.onBeforeCaptionAndToolbarHide, function(e){
console.log('onBeforeCaptionAndToolbarHide');
});
// onViewportClick
- Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onViewportClick, function(e){
+ Code.PhotoSwipe.Current.addEventHandler(Code.PhotoSwipe.EventTypes.onViewportClick, function(e){
console.log('onViewportClick');
});
// onCaptionAndToolbarShow
- Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onCaptionAndToolbarShow, function(e){
+ Code.PhotoSwipe.Current.addEventHandler(Code.PhotoSwipe.EventTypes.onCaptionAndToolbarShow, function(e){
console.log('onCaptionAndToolbarShow');
});
// onCaptionAndToolbarHide
- Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onCaptionAndToolbarHide, function(e){
+ Code.PhotoSwipe.Current.addEventHandler(Code.PhotoSwipe.EventTypes.onCaptionAndToolbarHide, function(e){
console.log('onCaptionAndToolbarHide');
@@ -204,7 +207,7 @@
console.log(thumbEls);
- }, false);
+ });
</script>
Oops, something went wrong.

0 comments on commit 612f9ef

Please sign in to comment.