mirror of
https://github.com/konvajs/konva.git
synced 2025-11-08 02:24:44 +08:00
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:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user