mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-18 18:41:08 +00:00
remove duplicate logic
This commit is contained in:
parent
026388d93c
commit
0836408035
1 changed files with 7 additions and 15 deletions
|
|
@ -151,21 +151,13 @@
|
|||
};
|
||||
}
|
||||
var obj = { }, proto = fabric.Shadow.prototype;
|
||||
if (this.color !== proto.color) {
|
||||
obj.color = this.color;
|
||||
}
|
||||
if (this.blur !== proto.blur) {
|
||||
obj.blur = this.blur;
|
||||
}
|
||||
if (this.offsetX !== proto.offsetX) {
|
||||
obj.offsetX = this.offsetX;
|
||||
}
|
||||
if (this.offsetY !== proto.offsetY) {
|
||||
obj.offsetY = this.offsetY;
|
||||
}
|
||||
if (this.affectStroke !== proto.affectStroke) {
|
||||
obj.affectStroke = this.affectStroke;
|
||||
}
|
||||
|
||||
['color', 'blur', 'offsetX', 'offsetY', 'affectStroke'].forEach(function(prop) {
|
||||
if (this[prop] !== proto[prop]) {
|
||||
obj[prop] = this[prop];
|
||||
}
|
||||
}, this);
|
||||
|
||||
return obj;
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue