mirror of
https://github.com/konvajs/konva.git
synced 2025-10-15 12:34:52 +08:00
brought back Ellipse and ellipse tests
This commit is contained in:
21
tests/js/unit/shapes/ellipseTests.js
Normal file
21
tests/js/unit/shapes/ellipseTests.js
Normal file
@@ -0,0 +1,21 @@
|
||||
Test.Modules.ELLIPSE = {
|
||||
'add ellipse': function(containerId) {
|
||||
var stage = new Kinetic.Stage({
|
||||
container: containerId,
|
||||
width: 578,
|
||||
height: 200
|
||||
});
|
||||
var layer = new Kinetic.Layer();
|
||||
var ellipse = new Kinetic.Ellipse({
|
||||
x: stage.getWidth() / 2,
|
||||
y: stage.getHeight() / 2,
|
||||
radius: [70, 35],
|
||||
fill: 'green',
|
||||
stroke: 'black',
|
||||
strokeWidth: 8
|
||||
});
|
||||
layer.add(ellipse);
|
||||
stage.add(layer);
|
||||
test(ellipse.getClassName() === 'Ellipse', 'shape type should be Ellipse');
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user