mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Do not create entries in Style#_values for default values.
This commit is contained in:
parent
fb890b2c8a
commit
7bc6da5401
1 changed files with 1 additions and 2 deletions
|
@ -152,7 +152,7 @@ var Style = Base.extend(new function() {
|
||||||
children[i]._style[set](value);
|
children[i]._style[set](value);
|
||||||
} else {
|
} else {
|
||||||
var old = this._values[key];
|
var old = this._values[key];
|
||||||
if (old != value) {
|
if (old !== value) {
|
||||||
if (isColor) {
|
if (isColor) {
|
||||||
if (old)
|
if (old)
|
||||||
old._owner = undefined;
|
old._owner = undefined;
|
||||||
|
@ -190,7 +190,6 @@ var Style = Base.extend(new function() {
|
||||||
value = this._defaults[key];
|
value = this._defaults[key];
|
||||||
if (value && value.clone)
|
if (value && value.clone)
|
||||||
value = value.clone();
|
value = value.clone();
|
||||||
this._values[key] = value;
|
|
||||||
} else {
|
} else {
|
||||||
var ctor = isColor ? Color : isPoint ? Point : null;
|
var ctor = isColor ? Color : isPoint ? Point : null;
|
||||||
if (ctor && !(value && value.constructor === ctor)) {
|
if (ctor && !(value && value.constructor === ctor)) {
|
||||||
|
|
Loading…
Reference in a new issue