mirror of
https://github.com/konvajs/konva.git
synced 2025-11-18 17:17:49 +08:00
added Circle backwards compatibility with Ellipse
This commit is contained in:
@@ -1282,6 +1282,24 @@ Test.prototype.tests = {
|
||||
layer.add(Ellipse);
|
||||
stage.add(layer);
|
||||
},
|
||||
'SHAPE - add circle using Circle': function(containerId) {
|
||||
var stage = new Kinetic.Stage({
|
||||
container: containerId,
|
||||
width: 578,
|
||||
height: 200
|
||||
});
|
||||
var layer = new Kinetic.Layer();
|
||||
var circle = new Kinetic.Circle({
|
||||
x: stage.getWidth() / 2,
|
||||
y: stage.getHeight() / 2,
|
||||
radius: 70,
|
||||
fill: 'green',
|
||||
stroke: 'black',
|
||||
strokeWidth: 4
|
||||
});
|
||||
layer.add(circle);
|
||||
stage.add(layer);
|
||||
},
|
||||
'SHAPE - add ellipse': function(containerId) {
|
||||
var stage = new Kinetic.Stage({
|
||||
container: containerId,
|
||||
|
||||
Reference in New Issue
Block a user