fix some docs and tests

This commit is contained in:
Anton Lavrenov
2019-02-20 09:13:39 -05:00
parent c4f21b67a3
commit febdc9e3d4
28 changed files with 200 additions and 1561 deletions

View File

@@ -940,7 +940,7 @@ suite('Container', function() {
strokeWidth: 2,
shadowColor: 'black',
shadowBlur: 2,
shadowOffset: [10, 10],
shadowOffset: { x: 10, y: 10 },
shadowOpacity: 0.5
});
@@ -1338,40 +1338,6 @@ suite('Container', function() {
);
});
// ======================================================
test('test deprecated get() method', function() {
var stage = addStage();
var layer = new Konva.Layer({
name: 'layerName',
id: 'layerId'
});
var group = new Konva.Group({
name: 'groupName',
id: 'groupId'
});
var rect = new Konva.Rect({
x: 200,
y: 20,
width: 100,
height: 50,
fill: 'red',
stroke: 'black',
strokeWidth: 4,
name: 'rectName',
id: 'rectId'
});
layer.add(group);
group.add(rect);
stage.add(layer);
assert.equal(
stage.get('.rectName')[0].attrs.id,
'rectId',
'problem with shape name selector'
);
});
// ======================================================
test('test find() selector by adding group, then layer, then shape', function() {
var stage = addStage();