mirror of
https://github.com/konvajs/konva.git
synced 2025-06-28 06:55:17 +08:00
Fix bug with toJSON, all properies of nodes were not serialized if some native objects of JS were extended.
This commit is contained in:
parent
a349fa488c
commit
8f8fcc8a90
4
dist/kinetic-core.js
vendored
4
dist/kinetic-core.js
vendored
@ -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;
|
||||
}
|
||||
}
|
||||
|
8
dist/kinetic-core.min.js
vendored
8
dist/kinetic-core.min.js
vendored
File diff suppressed because one or more lines are too long
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user