From 4a7588695a1b385f41acd6cbbfaf76b38b2a1439 Mon Sep 17 00:00:00 2001 From: wout Date: Wed, 30 Jan 2013 16:00:03 +0100 Subject: Added visible() and opacity() methods --- src/element.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/element.js') diff --git a/src/element.js b/src/element.js index e1e69ec..ac06109 100644 --- a/src/element.js +++ b/src/element.js @@ -12,6 +12,9 @@ SVG.Element = function Element(node) { 'fill-opacity': 1, 'stroke-opacity': 1, 'stroke-width': 0, + fill: '#000', + stroke: '#000', + opacity: 1, x: 0, y: 0, cx: 0, @@ -258,6 +261,10 @@ SVG.extend(SVG.Element, { return this; }, + // Is element visible? + visible: function() { + return this.node.style.display != 'none'; + }, // Private: find svg parent by instance _parent: function(parent) { var element = this; -- cgit v1.2.3