mirror of
https://github.com/konvajs/konva.git
synced 2025-09-18 18:27:58 +08:00
update Konva.Node.create flow
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user