Merge pull request #103 from davonium/allow_dom_extension

Fix bug with toJSON
This commit is contained in:
ericdrowell 2012-09-24 12:45:25 -07:00
commit 222addd579
3 changed files with 7 additions and 7 deletions

View File

@ -3,7 +3,7 @@
* http://www.kineticjs.com/
* Copyright 2012, Eric Rowell
* Licensed under the MIT or GPL Version 2 licenses.
* Date: Sep 23 2012
* Date: Sep 24 2012
*
* Copyright (C) 2011 - 2012 by Eric Rowell
*
@ -2874,7 +2874,7 @@ Kinetic.Stage.prototype = {
// serialize only attributes that are not function, image, DOM, or objects with methods
for(var key in node.attrs) {
var val = node.attrs[key];
if(!type._isFunction(val) && !type._isElement(val) && !type._hasMethods(val)) {
if(!type._isFunction(val) && !type._isElement(val) && !(type._isObject(val) && type._hasMethods(val))) {
obj.attrs[key] = val;
}
}

File diff suppressed because one or more lines are too long

View File

@ -133,7 +133,7 @@ Kinetic.Stage.prototype = {
// serialize only attributes that are not function, image, DOM, or objects with methods
for(var key in node.attrs) {
var val = node.attrs[key];
if(!type._isFunction(val) && !type._isElement(val) && !type._hasMethods(val)) {
if(!type._isFunction(val) && !type._isElement(val) && !(type._isObject(val) && type._hasMethods(val))) {
obj.attrs[key] = val;
}
}