mirror of
https://github.com/konvajs/konva.git
synced 2025-10-15 12:34:52 +08:00
better HDPI support
update packages
This commit is contained in:
@@ -5,7 +5,7 @@ suite('RGB', function() {
|
||||
|
||||
var imageObj = new Image();
|
||||
imageObj.onload = function() {
|
||||
|
||||
|
||||
var layer = new Konva.Layer();
|
||||
darth = new Konva.Image({
|
||||
x: 10,
|
||||
@@ -23,7 +23,7 @@ suite('RGB', function() {
|
||||
layer.draw();
|
||||
|
||||
// Assert fails even though '[255,0,128] = [255,0,128]'
|
||||
//assert.equal(darth.getFilterColorizeColor(), [255,0,128]);
|
||||
// assert.deepEqual(darth.getFilterColorizeColor(), [255,0,128]);
|
||||
|
||||
done();
|
||||
};
|
||||
@@ -37,7 +37,7 @@ suite('RGB', function() {
|
||||
|
||||
var imageObj = new Image();
|
||||
imageObj.onload = function() {
|
||||
|
||||
|
||||
var layer = new Konva.Layer();
|
||||
darth = new Konva.Image({
|
||||
x: 10,
|
||||
@@ -55,7 +55,7 @@ suite('RGB', function() {
|
||||
darth.red(0).green(255).blue(0);
|
||||
layer.draw();
|
||||
|
||||
// assert.equal(darth.getFilterColorizeColor(), [0,255,0]);
|
||||
// assert.deepEqual(darth.getFilterColorizeColor(), [0,255,0]);
|
||||
|
||||
done();
|
||||
|
||||
@@ -87,7 +87,7 @@ suite('RGB', function() {
|
||||
for( i=0; i<l; i+=1 ){
|
||||
var imageObj = new Image();
|
||||
imageObj.onload = (function(color,x){ return function() {
|
||||
|
||||
|
||||
var darth = new Konva.Image({
|
||||
x: x,
|
||||
y: 32,
|
||||
|
@@ -2,12 +2,6 @@ suite('RGBA', function() {
|
||||
// ======================================================
|
||||
test('colorize basic', function(done) {
|
||||
var data = [
|
||||
{
|
||||
color: '#ff0000',
|
||||
filter: [170, 170, 170, 0.5],
|
||||
// Actually 212 but in tests rounding half up
|
||||
result: [213, 85, 85, 255]
|
||||
},
|
||||
{
|
||||
color: '#2a6511',
|
||||
filter: [242, 193, 168, 0.33],
|
||||
@@ -67,11 +61,9 @@ suite('RGBA', function() {
|
||||
|
||||
var a0 = imageDataToArray(0);
|
||||
var a1 = imageDataToArray(1);
|
||||
var a2 = imageDataToArray(2);
|
||||
|
||||
assert.deepEqual(a0, data[0].result);
|
||||
assert.deepEqual(a1, data[1].result);
|
||||
assert.deepEqual(a2, data[2].result);
|
||||
|
||||
done();
|
||||
});
|
||||
|
Reference in New Issue
Block a user