magnifierjs-rails 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +6 -2
- data/lib/magnifierjs/rails/version.rb +1 -1
- data/vendor/assets/javascripts/magnifierjs.coffee +6 -4
- metadata +3 -3
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# Magnifierjs::Rails
|
2
2
|
|
3
|
-
|
3
|
+
This gem is a drop-in solution for an image magnifier looking like this:
|
4
|
+
|
5
|
+
![magnifier](http://public.momolog.info/magnifier.png)
|
4
6
|
|
5
7
|
## Installation
|
6
8
|
|
@@ -18,7 +20,9 @@ Or install it yourself as:
|
|
18
20
|
|
19
21
|
## Usage
|
20
22
|
|
21
|
-
|
23
|
+
magnifierjs will look for an image with the id `magnifierjs-image` and an
|
24
|
+
attribute `data-magnifierjs-zoomimage`, containing a URL to a larger version of the same image.
|
25
|
+
It will then display a magnifying glass with the larger image on hover.
|
22
26
|
|
23
27
|
## Contributing
|
24
28
|
|
@@ -21,10 +21,12 @@ $ ->
|
|
21
21
|
|
22
22
|
setLargeSrc()
|
23
23
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
24
|
+
# show the glass only when everything is loaded
|
25
|
+
$(window).load ->
|
26
|
+
image.mouseover ->
|
27
|
+
setLargeSrc()
|
28
|
+
$(document).mousemove(moveGlass)
|
29
|
+
glass.fadeIn('slow')
|
28
30
|
|
29
31
|
moveGlass = (e) ->
|
30
32
|
imgW = image.width()
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
version: 0.2.
|
8
|
+
- 2
|
9
|
+
version: 0.2.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Alexander Presber
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2013-11-
|
17
|
+
date: 2013-11-21 00:00:00 +01:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|