mirror of
https://github.com/konvajs/konva.git
synced 2026-01-09 11:34:38 +08:00
Merge pull request #661 from blabno/do-not-export-default-values
#660 Do not export default values
This commit is contained in:
@@ -799,8 +799,12 @@
|
||||
// serialize only attributes that are not function, image, DOM, or objects with methods
|
||||
for(key in attrs) {
|
||||
val = attrs[key];
|
||||
if(!type._isFunction(val) && !type._isElement(val) && !(type._isObject(val) && type._hasMethods(val))) {
|
||||
obj.attrs[key] = val;
|
||||
if (!type._isFunction(val) && !type._isElement(val) && !(type._isObject(val) && type._hasMethods(val))) {
|
||||
var getter = this[GET + Kinetic.Util._capitalize(key)];
|
||||
var defaultValue = null == getter ? null : getter.call({attrs: {}});
|
||||
if (defaultValue != val) {
|
||||
obj.attrs[key] = val;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user