Skip to content

Commit

Permalink
Fix zoom performance issue on chrome.
Browse files Browse the repository at this point in the history
  • Loading branch information
sachinchoolur committed Dec 11, 2016
1 parent 484fee6 commit cc97b3b
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 14 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lightgallery",
"version": "1.3.6",
"version": "1.3.7",
"description": "A lightweight, customizable, modular, responsive, lightbox gallery plugin for jQuery.",
"main": [
"dist/js/lightgallery.min.js",
Expand Down
2 changes: 1 addition & 1 deletion dist/css/lg-fb-comment-box.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! lightgallery - v1.3.6 - 2016-11-18
/*! lightgallery - v1.3.7 - 2016-12-11
* http://sachinchoolur.github.io/lightGallery/
* Copyright (c) 2016 Sachin N; Licensed GPLv3 */
.lg-outer.fb-comments .lg-img-wrap, .lg-outer.fb-comments .lg-video-cont {
Expand Down
2 changes: 1 addition & 1 deletion dist/css/lg-transitions.css

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

14 changes: 10 additions & 4 deletions dist/css/lightgallery.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! lightgallery - v1.3.6 - 2016-11-18
/*! lightgallery - v1.3.7 - 2016-12-11
* http://sachinchoolur.github.io/lightGallery/
* Copyright (c) 2016 Sachin N; Licensed GPLv3 */
@font-face {
Expand Down Expand Up @@ -477,11 +477,19 @@ body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item.lg-complete .lg-object
-webkit-transition-duration: 0s;
transition-duration: 0s;
}
.lg-outer .lg-item.lg-complete.lg-zoomable .lg-img-wrap {
.lg-outer.lg-use-transition-for-zoom .lg-item.lg-complete.lg-zoomable .lg-img-wrap {
-webkit-transition: -webkit-transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
-moz-transition: -moz-transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
-o-transition: -o-transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
transition: transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
}
.lg-outer.lg-use-left-for-zoom .lg-item.lg-complete.lg-zoomable .lg-img-wrap {
-webkit-transition: left 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, top 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
-moz-transition: left 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, top 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
-o-transition: left 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, top 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
transition: left 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, top 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
}
.lg-outer .lg-item.lg-complete.lg-zoomable .lg-img-wrap {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
-webkit-backface-visibility: hidden;
Expand Down Expand Up @@ -963,5 +971,3 @@ body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item.lg-complete .lg-object
-o-transition: left 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s;
transition: left 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s;
}

/*# sourceMappingURL=lightgallery.css.map */
2 changes: 1 addition & 1 deletion dist/css/lightgallery.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/lightgallery.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! lightgallery - v1.3.6 - 2016-11-18
/*! lightgallery - v1.3.7 - 2016-12-11
* http://sachinchoolur.github.io/lightGallery/
* Copyright (c) 2016 Sachin N; Licensed GPLv3 */

Expand Down
2 changes: 1 addition & 1 deletion dist/js/lightgallery.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lightgallery",
"version": "1.3.6",
"version": "1.3.7",
"description": "A lightweight, customizable, modular, responsive, lightbox gallery plugin for jQuery.",
"keywords": [
"jquery-plugin",
Expand Down
10 changes: 9 additions & 1 deletion src/css/lightgallery.css

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

2 changes: 1 addition & 1 deletion src/css/lightgallery.css.map

Large diffs are not rendered by default.

15 changes: 14 additions & 1 deletion src/sass/lg-zoom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,24 @@
}
}
}
&.lg-use-transition-for-zoom {
.lg-item.lg-complete.lg-zoomable {
.lg-img-wrap {
@include transitionCustom(transform $zoom-transition-duration cubic-bezier(0, 0, 0.25, 1) 0s);
}
}
}
&.lg-use-left-for-zoom {
.lg-item.lg-complete.lg-zoomable {
.lg-img-wrap {
@include transitionCustom(left $zoom-transition-duration cubic-bezier(0, 0, 0.25, 1) 0s, top $zoom-transition-duration cubic-bezier(0, 0, 0.25, 1) 0s);
}
}
}

.lg-item.lg-complete.lg-zoomable{

.lg-img-wrap {
@include transitionCustom(left $zoom-transition-duration cubic-bezier(0, 0, 0.25, 1) 0s, top $zoom-transition-duration cubic-bezier(0, 0, 0.25, 1) 0s);
@include translate3d(0, 0, 0);
@include backface-visibility(hidden);
}
Expand Down

0 comments on commit cc97b3b

Please sign in to comment.