diff options
author | wout <wout@impinc.co.uk> | 2014-08-25 10:33:35 +0200 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2014-08-25 10:33:35 +0200 |
commit | 7b8e6f1d5afe2472cd1245f9bb73b6d59238e541 (patch) | |
tree | 51f85409971875f642315b8cd3b67d8bbf0cc504 /src/set.js | |
parent | 7c195432d30bf2c179d2f5c2682b85d76ef9458b (diff) | |
download | svg.js-7b8e6f1d5afe2472cd1245f9bb73b6d59238e541.tar.gz svg.js-7b8e6f1d5afe2472cd1245f9bb73b6d59238e541.zip |
Removed internal references from SVG.Text
Diffstat (limited to 'src/set.js')
-rwxr-xr-x | src/set.js | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -2,7 +2,7 @@ SVG.Set = SVG.invent({ // Initialize create: function(members) { // Set initial state - Array.isArray(members) ?this.members = members : this.clear() + Array.isArray(members) ? this.members = members : this.clear() } // Add class methods @@ -40,6 +40,10 @@ SVG.Set = SVG.invent({ return this } + // Get the length of a set + , length: function() { + return this.members.length + } // Checks if a given element is present in set , has: function(element) { return this.index(element) >= 0 |