Skip to content

Commit

Permalink
support ctrl key for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Thornton authored and Jacob Thornton committed Jun 6, 2015
1 parent e659a0d commit fd4f3e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ https://fat.github.io/zoom.js

It's the best way to zoom an image. It transitions/zooms in really smoothly, and then when you're done, scrolls away, [esc] keys away, clicks away… clean af.

Also, now if you hold your meta key (``), it will open in a new tab. wow.
Also, now if you hold your meta key (`` on mac) or (`ctrl` on windows), it will open in a new tab. wow.


### Where
Expand All @@ -41,4 +41,4 @@ zoom.js should (in theory) work in all relevant browsers. If not, create an issu

### Who

Written by <a href="//twitter.com/fat">@fat</a>, made better by you.
Written by <a href="//twitter.com/fat">@fat</a>, made better by you.
2 changes: 1 addition & 1 deletion js/zoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

if (this._$body.hasClass('zoom-overlay-open')) return

if (e.metaKey) return window.open(e.target.src, '_blank')
if (e.metaKey || e.ctrlKey) return window.open(e.target.src, '_blank')

if (target.width >= (window.innerWidth - Zoom.OFFSET)) return

Expand Down

0 comments on commit fd4f3e4

Please sign in to comment.