mirror of
https://github.com/konvajs/konva.git
synced 2025-04-05 20:48:28 +08:00
fix tests for HDPI
This commit is contained in:
parent
7aa3c3238d
commit
d49ee3dff1
@ -111,6 +111,6 @@ suite('Blob', function() {
|
||||
layer.add(blob);
|
||||
stage.add(layer);
|
||||
|
||||
cloneAndCompareLayer(layer, 100);
|
||||
cloneAndCompareLayer(layer, 150);
|
||||
});
|
||||
});
|
||||
|
@ -114,6 +114,7 @@ suite('Line', function() {
|
||||
|
||||
// ======================================================
|
||||
test('add line with shadow', function() {
|
||||
Konva.pixelRatio = 1;
|
||||
var stage = addStage();
|
||||
var layer = new Konva.Layer();
|
||||
|
||||
@ -146,9 +147,9 @@ suite('Line', function() {
|
||||
context.strokeStyle = 'blue';
|
||||
|
||||
context.shadowColor = 'rgba(0,0,0,0.5)';
|
||||
context.shadowBlur = 40;
|
||||
context.shadowOffsetX = 20;
|
||||
context.shadowOffsetY = 20;
|
||||
context.shadowBlur = 20;
|
||||
context.shadowOffsetX = 10;
|
||||
context.shadowOffsetY = 10;
|
||||
context.moveTo(73, 160);
|
||||
context.lineTo(340, 23);
|
||||
|
||||
@ -156,6 +157,8 @@ suite('Line', function() {
|
||||
// context.fill();
|
||||
context.restore();
|
||||
|
||||
Konva.pixelRatio = undefined;
|
||||
|
||||
compareLayerAndCanvas(layer, canvas, 50);
|
||||
|
||||
var trace = layer.getContext().getTrace();
|
||||
@ -309,7 +312,7 @@ suite('Line', function() {
|
||||
assert.equal(rect.height, 52, 'check height');
|
||||
});
|
||||
|
||||
test.only('line caching', function() {
|
||||
test('line caching', function() {
|
||||
// Konva.pixelRatio = 1;
|
||||
var stage = addStage();
|
||||
var layer = new Konva.Layer();
|
||||
|
Loading…
Reference in New Issue
Block a user