Currently when creating a shape, additional plain shape objects will inherit properties from the initial plain shape object:
const from = {
type: 'circle',
r: 10,
cx: 50,
cy: 50,
fill: '#E54',
moveIndex: 2,
reverse: true,
};
const to = {
r: 20,
};
shape( from, to );
The to shape in the above example will inherit every from property apart from r. Currently to avoid this behaviour the to plain shape object should redefine the undesired properties with the default value. e.g. reverse: false.
Currently I'm planning to abandon inheritance altogether and suggest plain Javascript if inheritance is required.
Currently when creating a shape, additional plain shape objects will inherit properties from the initial plain shape object:
The
to
shape in the above example will inherit everyfrom
property apart fromr
. Currently to avoid this behaviour theto
plain shape object should redefine the undesired properties with the default value. e.g.reverse: false
.Currently I'm planning to abandon inheritance altogether and suggest plain Javascript if inheritance is required.