summaryrefslogtreecommitdiffstats
path: root/src/clip.js
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2013-03-25 21:33:50 +0100
committerwout <wout@impinc.co.uk>2013-03-25 21:33:50 +0100
commit7b0ba313154e6990fe0d11caa981dc4102193e5e (patch)
treed9940c0af72b587adc3f0b246dc95e021026d957 /src/clip.js
parent264c100153fc45cedf94a8cc8a0174fae12e1fe8 (diff)
downloadsvg.js-7b0ba313154e6990fe0d11caa981dc4102193e5e.tar.gz
svg.js-7b0ba313154e6990fe0d11caa981dc4102193e5e.zip
Updated README
Diffstat (limited to 'src/clip.js')
-rw-r--r--src/clip.js15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/clip.js b/src/clip.js
index 9562162..c1e82cb 100644
--- a/src/clip.js
+++ b/src/clip.js
@@ -1,5 +1,4 @@
-
-SVG.Clip = function Clip() {
+SVG.Clip = function() {
this.constructor.call(this, SVG.create('clipPath'))
}
@@ -7,7 +6,6 @@ SVG.Clip = function Clip() {
SVG.Clip.prototype = new SVG.Container
SVG.extend(SVG.Element, {
-
// Distribute clipPath to svg element
clipWith: function(element) {
/* use given clip or create a new one */
@@ -16,13 +14,4 @@ SVG.extend(SVG.Element, {
return this.attr('clip-path', 'url(#' + this.clip.attr('id') + ')')
}
-})
-
-// Add container method
-SVG.extend(SVG.Container, {
- // Create clipping element
- clip: function() {
- return this.defs().put(new SVG.Clip)
- }
-
-})
+}) \ No newline at end of file