1
1
# jquery-svgpan
2
2
3
- This is an an adaptation of Andrea Leofreddi's [ SVGPan
4
- library] ( http://code.google.com/p/svgpan/ ) , version 1.2.2, for use as
5
- a jQuery plugin.
3
+ This is an an adaptation of Andrea Leofreddi's [ SVGPan library] [ ] ,
4
+ version 1.2.2, for use as a [ jQuery] [ ] plugin.
5
+
6
+ [ SVGPan library ] : http://code.google.com/p/svgpan/
7
+ [ jQuery ] : http://jquery.org/
6
8
7
9
When called upon SVG element(s), this will add all the capabilities of
8
10
Andrea Leofreddi's SVGPan library to those elements. Non-SVG elements
9
11
will be silently ignored.
10
12
11
13
This is useful if you have SVG content sitting in the DOM. For
12
- example, if you are generating graphics via the [ d3
13
- visualization] ( http://mbostock.github.com/d3/ ) library. It will not
14
- work if you are embedding the SVG through some other means.
14
+ example, if you are generating graphics via the [ d3 visualization] [ ]
15
+ library. It will not work if you are embedding the SVG through some
16
+ other means.
17
+
18
+ [ d3 visualization ] : http://mbostock.github.com/d3/
15
19
16
20
[ See it in action!] ( http://talos.github.com/jquery-svgpan/demo.html )
17
21
@@ -20,15 +24,11 @@ work if you are embedding the SVG through some other means.
20
24
You can configure the behaviour of the pan/zoom/drag by passing
21
25
arguments.
22
26
23
- ` viewportId ` : String ID of the root SVG element.
24
-
25
- ` enablePan ` : Boolean enable or disable panning (default enabled)
26
-
27
- ` enableZoom ` : Boolean enable or disable zooming (default enabled)
28
-
29
- ` enableDrag ` : Boolean enable or disable dragging (default disabled)
30
-
31
- ` zoomScale ` : Float zoom sensitivity, defaults to .2
27
+ * ` viewportId ` : String ID of the root SVG element.
28
+ * ` enablePan ` : Boolean enable or disable panning (default enabled)
29
+ * ` enableZoom ` : Boolean enable or disable zooming (default enabled)
30
+ * ` enableDrag ` : Boolean enable or disable dragging (default disabled)
31
+ * ` zoomScale ` : Float zoom sensitivity, defaults to .2
32
32
33
33
``` javascript
34
34
$ (selector).svgPan (viewportId, enablePan, enableZoom, enableDrag, zoomScale);
@@ -53,14 +53,14 @@ This would enable SVGPan for a single element (provided it is an SVG).
53
53
54
54
Andrea Leofreddi's original SVGPan library on Google code
55
55
56
- http://code.google.com/p/svgpan/
56
+ * < http://code.google.com/p/svgpan/ >
57
57
58
58
Fork jquery-svgpan at
59
59
60
- http://www.github.com/talos/jquery-svgpan
60
+ * < http://www.github.com/talos/jquery-svgpan >
61
61
62
62
CDN jquery-svgpan from
63
63
64
- http://talos.github.com/jquery-svgpan/jquery-svgpan.js
64
+ * < http://talos.github.com/jquery-svgpan/jquery-svgpan.js >
65
65
66
- http://talos.github.com/jquery-svgpan/jquery-svgpan.min.js
66
+ * < http://talos.github.com/jquery-svgpan/jquery-svgpan.min.js >
0 commit comments