fix cache with float dimensions. fix #798

This commit is contained in:
Anton Lavrenov
2019-11-28 11:51:40 -05:00
parent 472441fcfe
commit 65eeb13d66
5 changed files with 33 additions and 6 deletions

View File

@@ -751,6 +751,29 @@ suite('Caching', function() {
cloneAndCompareLayer(layer, 210);
});
test('test rect with float dimensions', function() {
var stage = addStage();
var layer = new Konva.Layer();
stage.add(layer);
var group = new Konva.Group({
x: 10,
y: 10,
draggable: true
});
layer.add(group);
var circle = new Konva.Circle({
radius: 52.2,
fill: 'red',
});
group.add(circle);
group.cache();
stage.draw();
cloneAndCompareLayer(layer, 210);
});
test('cache group with rectangle with fill and opacity', function() {
var stage = addStage();