diff options
Diffstat (limited to 'src/clip.js')
-rw-r--r-- | src/clip.js | 15 |
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 |