Permalink
Browse files

allow filtering elements when serializing toJSON

  • Loading branch information...
1 parent 667dbf3 commit faebc364626ac6caa78021505a965e7cfe9748b2 @jberryman committed Apr 19, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 raphael.json.js
View
@@ -15,7 +15,7 @@
for ( var el = paper.bottom; el != null; el = el.next ) {
data = callback ? callback(el, new Object) : new Object;
- elements.push({
+ if ( data ) elements.push({
data: data,
type: el.type,
attrs: el.attrs,

0 comments on commit faebc36

Please sign in to comment.