first pass at rewriting the setAttrs logic in Node. In order to have a cleaner OO design, the data type logic needs to exist within each respective module, such that the setter methods are the source of truth.

the setAttrs method now simply calls setter methods.  Also added _clone
and _merge utility methods in Type.  The refactor greatly improves
decoupling and will enable much cleaner OO design in the near future.
This commit is contained in:
ericdrowell
2012-09-24 20:34:23 -07:00
parent a349fa488c
commit 0353214fb6
12 changed files with 575 additions and 652 deletions

View File

@@ -3305,7 +3305,8 @@ Test.prototype.tests = {
layer.add(rect);
stage.add(layer);
rect.setShadow({
offset: [1, 2]
});
@@ -3341,6 +3342,7 @@ Test.prototype.tests = {
});
test(rect.getShadow().offset.x === 5, 'shadow offset x should be 5');
test(rect.getShadow().offset.y === 6, 'shadow offset y should be 6');
},
'NODE - test setOffset': function(containerId) {
var stage = new Kinetic.Stage({