Skip to content

Commit

Permalink
v1.0.12
Browse files Browse the repository at this point in the history
  • Loading branch information
codecomputerlove committed Jun 16, 2011
1 parent cdf60a3 commit eb751a9
Show file tree
Hide file tree
Showing 15 changed files with 451 additions and 132 deletions.
18 changes: 10 additions & 8 deletions README.md
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion build.properties
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions build.xml
Expand Up @@ -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>

Expand Down
2 changes: 1 addition & 1 deletion src/caption-class.js
Expand Up @@ -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();
}
Expand Down
24 changes: 22 additions & 2 deletions src/caption-toolbar-class.js
Expand Up @@ -192,6 +192,11 @@
this.addEventListeners();
this.resetAutoHideTimeout();

this.dispatchEvent({
type: Code.PhotoSwipe.CaptionToolbarClass.EventTypes.onShow,
target: this
});

},


Expand Down Expand Up @@ -221,6 +226,12 @@
* Function: onFadeOut
*/
onFadeOut: function(){

this.dispatchEvent({
type: Code.PhotoSwipe.CaptionToolbarClass.EventTypes.onHide,
target: this
});

},


Expand Down Expand Up @@ -249,7 +260,12 @@

this.caption.hide();
this.toolbar.hide();


this.dispatchEvent({
type: Code.PhotoSwipe.CaptionToolbarClass.EventTypes.onHide,
target: this
});

},


Expand Down Expand Up @@ -345,7 +361,11 @@


});


Code.PhotoSwipe.CaptionToolbarClass.EventTypes = {
onShow: 'onShow',
onHide: 'onHide'
};

})
(
Expand Down
19 changes: 19 additions & 0 deletions src/change.log
Expand Up @@ -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



189 changes: 104 additions & 85 deletions src/examples/debug.html
Expand Up @@ -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>

Expand Down Expand Up @@ -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

});

Expand Down
15 changes: 15 additions & 0 deletions src/examples/events.html
Expand Up @@ -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);
Expand Down

0 comments on commit eb751a9

Please sign in to comment.