diff options
author | wout <wout@impinc.co.uk> | 2012-12-30 19:20:31 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2012-12-30 19:20:31 +0100 |
commit | 7d3e4c43a64cdb9ce19b71d8dc1783c0bc031d91 (patch) | |
tree | 05441a30fbac6ccdd9ee2cf91b3c583a5ab6e0a4 /src/element.js | |
parent | b663ead6ee026e4c7b6f3b971e2490222c4a3a1a (diff) | |
download | svg.js-7d3e4c43a64cdb9ce19b71d8dc1783c0bc031d91.tar.gz svg.js-7d3e4c43a64cdb9ce19b71d8dc1783c0bc031d91.zip |
Added hide() and show()
Diffstat (limited to 'src/element.js')
-rw-r--r-- | src/element.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/element.js b/src/element.js index e7701ce..6eea786 100644 --- a/src/element.js +++ b/src/element.js @@ -159,6 +159,20 @@ SVG.extend(SVG.Element, { }; }, + // show element + show: function() { + this.node.style.display = ''; + + return this; + }, + + // hide element + hide: function() { + this.node.style.display = 'none'; + + return this; + }, + // private: find svg parent _parent: function(pt) { var e = this; |