Skip to content

Commit

Permalink
clear zoom / scale setting if ratio is 1
Browse files Browse the repository at this point in the history
  • Loading branch information
mojavelinux committed Aug 12, 2015
1 parent 487cc62 commit 35d85a2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions dist/bespoke-scale.js
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* bespoke-scale v1.0.1
*
* Copyright 2014, Mark Dalgleish
* Copyright 2015, Mark Dalgleish
* This content is released under the MIT license
* http://mit-license.org/markdalgleish
*/
Expand Down Expand Up @@ -34,10 +34,10 @@ module.exports = function(options) {

scale = useZoom ?
function(ratio, element) {
element.style.zoom = ratio;
element.style.zoom = ratio === 1 ? '' : ratio;
} :
function(ratio, element) {
element.style[transformProperty] = 'scale(' + ratio + ')';
element.style[transformProperty] = ratio === 1 ? '' : 'scale(' + ratio + ')';
},

scaleAll = function() {
Expand Down
4 changes: 2 additions & 2 deletions dist/bespoke-scale.min.js
100755 → 100644

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

4 changes: 2 additions & 2 deletions lib/bespoke-scale.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ module.exports = function(options) {

scale = useZoom ?
function(ratio, element) {
element.style.zoom = ratio;
element.style.zoom = ratio === 1 ? '' : ratio;
} :
function(ratio, element) {
element.style[transformProperty] = 'scale(' + ratio + ')';
element.style[transformProperty] = ratio === 1 ? '' : 'scale(' + ratio + ')';
},

scaleAll = function() {
Expand Down

0 comments on commit 35d85a2

Please sign in to comment.