Permalink
Browse files

v1.0.12

  • Loading branch information...
1 parent cdf60a3 commit eb751a9a816e1d3d8fc286ce454d48a704d0747d codecomputerlove committed Jun 16, 2011
View
@@ -9,20 +9,22 @@ 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.11
+Latest Release v1.0.12
---------------------
-[Download](http://github.com/downloads/codecomputerlove/PhotoSwipe/code-photoswipe.v1.0.11.zip)
+[Download](http://github.com/downloads/codecomputerlove/PhotoSwipe/code-photoswipe.v1.0.12.zip)
-- Panning speed with zoomed images now runs at correct speed thanks to [heardfrom](https://github.com/heardfrom) and [cilogi](https://github.com/cilogi)
+- Fixed issues with Chrome 12
-- Added maximum and minimum user zoom settings
+- Added the following new events "onCaptionEndToolbarShow" and "onCaptionEndToolbarHide"
-- Should now play nicely if including MooTools thanks to [chameron](https://github.com/chameron)
+- Fixed issue with position of caption when placed at the bottom
+- Events now pass target value (should always equal the current instance of PhotoSwipe)
+
+- Added new "using-meta-data.html" example
+
+- Updated to jQuery Animate Enhanced v0.75
-Issue with Chrome 12
---------------------
-Presently we are aware of an issue with PhotoSwipe and the latest version of Chrome. This seems to be related to hardware acceleration which is now enabled by default. To get around this, simple use the standard jQuery version of PhotoSwipe.
Features
View
@@ -5,7 +5,7 @@
project.description = PhotoSwipe
project.src.dir = src
-project.build.version = 1.0.11
+project.build.version = 1.0.12
project.build.year = 2011
project.build.workdir = work
View
@@ -124,6 +124,9 @@
<antcall target="versionStamp">
<param name="filePath" value="${project.build.workdir}/examples/jquery-mobile.html"/>
</antcall>
+ <antcall target="versionStamp">
+ <param name="filePath" value="${project.build.workdir}/examples/using-meta-data.html"/>
+ </antcall>
</target>
View
@@ -102,7 +102,7 @@
resetPosition: function(){
var top;
-
+
if (this.settings.position === 'bottom') {
top = Util.DOM.windowHeight() - Util.DOM.outerHeight(this.el) + Util.DOM.windowScrollTop();
}
@@ -192,6 +192,11 @@
this.addEventListeners();
this.resetAutoHideTimeout();
+ this.dispatchEvent({
+ type: Code.PhotoSwipe.CaptionToolbarClass.EventTypes.onShow,
+ target: this
+ });
+
},
@@ -221,6 +226,12 @@
* Function: onFadeOut
*/
onFadeOut: function(){
+
+ this.dispatchEvent({
+ type: Code.PhotoSwipe.CaptionToolbarClass.EventTypes.onHide,
+ target: this
+ });
+
},
@@ -249,7 +260,12 @@
this.caption.hide();
this.toolbar.hide();
-
+
+ this.dispatchEvent({
+ type: Code.PhotoSwipe.CaptionToolbarClass.EventTypes.onHide,
+ target: this
+ });
+
},
@@ -345,7 +361,11 @@
});
-
+
+ Code.PhotoSwipe.CaptionToolbarClass.EventTypes = {
+ onShow: 'onShow',
+ onHide: 'onHide'
+ };
})
(
View
@@ -139,3 +139,22 @@ Major update:
- Added maximum and minimum user zoom settings
- Should now play nicely if including MooTools thanks to chameron [https://github.com/chameron]
+
+
+1.0.11 09.06.12 - Ste Brennan
+-----------------------------
+
+- Fixed issues with Chrome 12
+
+- Added the following new events "onCaptionEndToolbarShow" and "onCaptionEndToolbarHide"
+
+- Fixed issue with position of caption when placed at the bottom
+
+- Events now pass target value (should always equal the current instance of PhotoSwipe)
+
+- Added new "using-meta-data.html" example
+
+- Updated to jQuery Animate Enhanced v0.75
+
+
+
View
@@ -8,11 +8,8 @@
<link href="../photoswipe.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../lib/simple-inheritance.js"></script>
-
- <script type="text/javascript" src="../lib/mootools-core-1.3.2-full-compat-yc.js"></script>
-
+
<script type="text/javascript" src="../util.js"></script>
-
<script type="text/javascript" src="../util-dom.js"></script>
<script type="text/javascript" src="../util-animation.js"></script>
@@ -51,126 +48,148 @@
// Set up PhotoSwipe with all anchor tags in the Gallery container
document.addEventListener('DOMContentLoaded', function(){
- /*
- // Add event listeners
+ var addEventListeners = false;
- // onBeforeShow
- Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onBeforeShow, function(e){
-
- console.log('onBeforeShow');
-
- });
-
- // onShow
- Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onShow, function(e){
-
- console.log('onShow');
-
- });
+ if (addEventListeners){
+ // Add event listeners
- // onBeforeHide
- Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onBeforeHide, function(e){
-
- console.log('onBeforeHide');
-
- });
-
- // onHide
- Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onHide, function(e){
-
- console.log('onHide');
-
- });
-
- // onShowNext
- Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onShowNext, function(e){
-
- console.log('onShowNext');
-
- });
-
- // onShowPrevious
- Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onShowPrevious, function(e){
+ // onBeforeShow
+ Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onBeforeShow, function(e){
+
+ console.log('onBeforeShow');
+
+ });
- console.log('onShowPrevious');
+ // onShow
+ Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onShow, function(e){
+
+ console.log('onShow');
+
+ });
- });
-
- // onDisplayImage
- Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onDisplayImage, function(e){
+ // onBeforeHide
+ Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onBeforeHide, function(e){
+
+ console.log('onBeforeHide');
+
+ });
- console.log('onDisplayImage');
+ // onHide
+ Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onHide, function(e){
+
+ console.log('onHide');
+
+ });
- });
-
- // onResetPosition
- Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onResetPosition, function(e){
+ // onShowNext
+ Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onShowNext, function(e){
+
+ console.log('onShowNext');
+
+ });
+
+ // onShowPrevious
+ Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onShowPrevious, function(e){
+
+ console.log('onShowPrevious');
+
+ });
- console.log('onResetPosition');
+ // onDisplayImage
+ Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onDisplayImage, function(e){
+
+ console.log('onDisplayImage');
+
+ });
- });
-
- // onSlideshowStart
- Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onSlideshowStart, function(e){
+ // onResetPosition
+ Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onResetPosition, function(e){
+
+ console.log('onResetPosition');
+
+ });
- console.log('onSlideshowStart');
+ // onSlideshowStart
+ Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onSlideshowStart, function(e){
+
+ console.log('onSlideshowStart');
+
+ });
- });
-
- // onSlideshowStop
- Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onSlideshowStop, function(e){
+ // onSlideshowStop
+ Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onSlideshowStop, function(e){
+
+ console.log('onSlideshowStop');
+
+ });
- console.log('onSlideshowStop');
+ // onBeforeCaptionAndToolbarShow
+ Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onBeforeCaptionAndToolbarShow, function(e){
+
+ console.log('onBeforeCaptionAndToolbarShow');
+
+ });
- });
-
- // onBeforeCaptionAndToolbarShow
- Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onBeforeCaptionAndToolbarShow, function(e){
-
- console.log('onBeforeCaptionAndToolbarShow');
+ // onBeforeCaptionAndToolbarHide
+ Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onBeforeCaptionAndToolbarHide, function(e){
+
+ console.log('onBeforeCaptionAndToolbarHide');
+
+ });
- });
-
- // onBeforeCaptionAndToolbarHide
- Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onBeforeCaptionAndToolbarHide, function(e){
+ // onViewportClick
+ Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onViewportClick, function(e){
+
+ console.log('onViewportClick');
+
+ });
- console.log('onBeforeCaptionAndToolbarHide');
+ // onCaptionAndToolbarShow
+ Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onCaptionAndToolbarShow, function(e){
+
+ console.log('onCaptionAndToolbarShow');
+
+ });
- });
+ // onCaptionAndToolbarHide
+ Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onCaptionAndToolbarHide, function(e){
+
+ console.log('onCaptionAndToolbarHide');
+
+ });
+ }
- // onViewportClick
- Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onViewportClick, function(e){
-
- console.log('onViewportClick');
-
- });
- */
var thumbEls = Code.photoSwipe('a', '#Gallery', {
getImageSource: Code.PhotoSwipe.GetImageSource,
getImageCaption: Code.PhotoSwipe.GetImageCaption,
+ getImageMetaData: Code.PhotoSwipe.GetImageMetaData,
fadeInSpeed: 250,
fadeOutSpeed: 500,
slideSpeed: 250,
swipeThreshold: 50,
swipeTimeThreshold: 250,
- loop: true,
+ loop: false,
slideshowDelay: 3000,
imageScaleMethod: 'fit', // Either "fit" or "zoom"
preventHide: false,
zIndex: 1000,
-
+ backButtonHideEnabled: true,
+
/* Experimental - iOS only at the moment */
allowUserZoom: true,
allowRotationOnUserZoom: true,
+ maxUserZoom: 5.0,
+ minUserZoom: 0.5,
+ adjustUserPanToZoom: true,
captionAndToolbarHide: false,
captionAndToolbarHideOnSwipe: true,
captionAndToolbarFlipPosition: false,
captionAndToolbarAutoHideDelay: 5000,
captionAndToolbarOpacity: 0.8,
- captionAndToolbarShowEmptyCaptions: true
+ captionAndToolbarShowEmptyCaptions: true
});
View
@@ -125,6 +125,21 @@
});
+ // onCaptionAndToolbarShow
+ Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onCaptionAndToolbarShow, function(e){
+
+ console.log('onCaptionAndToolbarShow');
+
+ });
+
+
+ // onCaptionAndToolbarHide
+ Code.PhotoSwipe.Current.addEventListener(Code.PhotoSwipe.EventTypes.onCaptionAndToolbarHide, function(e){
+
+ console.log('onCaptionAndToolbarHide');
+
+ });
+
Code.photoSwipe('a', '#Gallery');
}, false);
Oops, something went wrong.

0 comments on commit eb751a9

Please sign in to comment.