diff options
author | wout <wout@impinc.co.uk> | 2012-12-22 12:53:11 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2012-12-22 12:53:11 +0100 |
commit | 41c12fb60b9ba2afbdaca5a445a7af59d2bccd5a (patch) | |
tree | 5bf794377901410fa0a061a99038a865974fffea /src/clip.js | |
parent | 740392ee6c756b1d794fa60cb991e70ca4bbb558 (diff) | |
download | svg.js-41c12fb60b9ba2afbdaca5a445a7af59d2bccd5a.tar.gz svg.js-41c12fb60b9ba2afbdaca5a445a7af59d2bccd5a.zip |
Added gradient
Diffstat (limited to 'src/clip.js')
-rw-r--r-- | src/clip.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/clip.js b/src/clip.js index ddc2588..f4fba45 100644 --- a/src/clip.js +++ b/src/clip.js @@ -4,7 +4,7 @@ var clipID = 0; SVG.Clip = function Clip() { this.constructor.call(this, SVG.create('clipPath')); - this.id = '_' + (clipID++); + this.id = 'svgjs_clip_' + (clipID++); this.attr('id', this.id); }; @@ -19,7 +19,7 @@ SVG.extend(SVG.Element, { // clip element using another element clip: function(b) { - var p = this.mother().defs().clipPath(); + var p = this.mother().defs().clip(); b(p); return this.clipTo(p); @@ -36,7 +36,7 @@ SVG.extend(SVG.Element, { SVG.extend(SVG.Defs, { // define clippath - clipPath: function() { + clip: function() { var e = new SVG.Clip(); this.add(e); |