Skip to content

Commit

Permalink
Bugfix for issue #2, Increase Z-Index
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Oct 12, 2015
1 parent 9b3dd39 commit 7e3b3d5
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 21 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ var gallery = $('.gallery a').simpleLightbox();
gallery.next(); // Next Image
```
### Changelog
**1.4.2 - Bugfix for issue #2 - Drop Event does not fire when mouse leaves window**
**1.4.1 - The whole caption Selector is rewritten. You can now select an element and get its text, use data or attribute**
**1.4.0 - Caption Attribute can now be what, you want, or data-title. Fixed some small issues**
**1.3.1 - Bugfix: disable keyboard control if lightbox is closed**
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simplelightbox",
"version": "1.4.1",
"version": "1.4.2",
"homepage": "http://andreknieriem.de/simple-lightbox",
"authors": [
"André Knieriem <[email protected]> (http://andreknieriem.de)"
Expand Down
24 changes: 14 additions & 10 deletions dist/simple-lightbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ $.fn.simpleLightbox = function( options )
return false;
},
opened = false,

selector = this.selector,
transPrefix = transPrefix(),
canTransisions = (transPrefix !== false) ? true : false,
Expand Down Expand Up @@ -221,6 +222,7 @@ $.fn.simpleLightbox = function( options )
});
},
close = function(){
if(animating) return;
var elem = $(selector).eq(index),
triggered = false;
elem.trigger($.Event('close.simplelightbox'));
Expand Down Expand Up @@ -302,7 +304,7 @@ $.fn.simpleLightbox = function( options )
mousedown = true;
swipeStart = e.originalEvent.pageX || e.originalEvent.touches[ 0 ].pageX;
})
.on( 'touchmove mousemove pointermove MSPointerMove', '.sl-image', function(e)
.on( 'touchmove mousemove pointermove MSPointerMove', function(e)
{
if(!mousedown) return true;
e.preventDefault();
Expand All @@ -311,16 +313,18 @@ $.fn.simpleLightbox = function( options )
if( canTransisions ) slide( 0, -swipeDiff + 'px' );
else image.css( 'left', imageLeft - swipeDiff + 'px' );
})
.on( 'touchend mouseup touchcancel pointerup pointercancel MSPointerUp MSPointerCancel', '.sl-image' ,function(e)
.on( 'touchend mouseup touchcancel pointerup pointercancel MSPointerUp MSPointerCancel',function(e)
{
mousedown = false;
if( Math.abs( swipeDiff ) > options.swipeTolerance ) {
loadImage( swipeDiff > 0 ? 1 : -1 );
}
else
{
if( canTransisions ) slide( options.animationSpeed / 1000, 0 + 'px' );
else image.animate({ 'left': imageLeft + 'px' }, options.animationSpeed / 2 );
if(mousedown){
mousedown = false;
if( Math.abs( swipeDiff ) > options.swipeTolerance ) {
loadImage( swipeDiff > 0 ? 1 : -1 );
}
else
{
if( canTransisions ) slide( options.animationSpeed / 1000, 0 + 'px' );
else image.animate({ 'left': imageLeft + 'px' }, options.animationSpeed / 2 );
}
}
});

Expand Down
2 changes: 1 addition & 1 deletion dist/simple-lightbox.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions dist/simplelightbox.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
background: #fff;
opacity: 0.7;
display: none;
z-index: 6;
z-index: 1006;
}

/* line 12, ../sass/simplelightbox.scss */
.sl-wrapper {
z-index: 10;
z-index: 1000;
}
/* line 14, ../sass/simplelightbox.scss */
.sl-wrapper button {
Expand All @@ -33,15 +33,15 @@
position: fixed;
right: 30px;
top: 30px;
z-index: 15;
z-index: 1015;
}
/* line 33, ../sass/simplelightbox.scss */
.sl-wrapper .sl-counter {
display: none;
position: fixed;
top: 30px;
left: 30px;
z-index: 15;
z-index: 1015;
}
/* line 41, ../sass/simplelightbox.scss */
.sl-wrapper .sl-navigation {
Expand All @@ -58,7 +58,7 @@
line-height: 30px;
text-algin: center;
display: block;
z-index: 15;
z-index: 1015;
}
/* line 54, ../sass/simplelightbox.scss */
.sl-wrapper .sl-navigation button.sl-next {
Expand Down Expand Up @@ -100,7 +100,7 @@
bottom: 5px;
right: 5px;
color: #fff;
z-index: 5;
z-index: 1005;
}

/* line 97, ../sass/simplelightbox.scss */
Expand All @@ -115,7 +115,7 @@
position: fixed;
top: 50%;
width: 40px;
z-index: 10;
z-index: 1000;
-webkit-animation: pulsate 1s ease-out infinite;
-moz-animation: pulsate 1s ease-out infinite;
-ms-animation: pulsate 1s ease-out infinite;
Expand Down
2 changes: 1 addition & 1 deletion dist/simplelightbox.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simplelightbox",
"version": "1.4.1",
"version": "1.4.2",
"description": "Touch-friendly image lightbox for mobile and desktop with jQuery",
"main": "dist/simple-lightbox.js",
"repository": {
Expand Down

0 comments on commit 7e3b3d5

Please sign in to comment.