update Konva.Node.create flow

This commit is contained in:
lavrton
2015-08-28 10:29:52 +07:00
parent 981f245833
commit 026423402d
3 changed files with 22 additions and 4 deletions

View File

@@ -2167,6 +2167,17 @@ suite('Node', function() {
assert.equal(stage.toJSON(), json);
});
// ======================================================
test('create node using object', function() {
var node = new Konva.Circle({
id: 'test',
radius: 10
});
var clone = Konva.Node.create(node.toObject());
assert.deepEqual(node.toObject(), clone.toObject());
});
// ======================================================
test('serialize stage with custom shape', function() {
var stage = addStage();