toObject fixes

This commit is contained in:
Anton Lavrenov
2018-07-05 14:49:02 +07:00
parent b18b11bc5f
commit e6c5325ccb
5 changed files with 21 additions and 5 deletions

View File

@@ -3350,6 +3350,16 @@ suite('Node', function() {
delete Number.prototype.customFunc;
});
test('toObject with property in attrs and instanse', function() {
var node = new Konva.Circle({
id: 'foo',
radius: 10,
filled: true
});
node.filled = true;
assert.equal(node.toObject().attrs.filled, true);
});
test('test findAncestor', function() {
var stage = addStage();
stage.setAttrs({