performance improvement

This commit is contained in:
lavrton
2015-02-09 06:29:31 +07:00
parent 9b27ce6593
commit 367d829784
11 changed files with 491 additions and 98 deletions

View File

@@ -15,6 +15,28 @@ suite('Util', function(){
blue: 200,
alpha: 0.5
}), 'rgba(100,150,200,0.5)');
});
test('test colorToRGBA', function(){
assert.deepEqual(Konva.Util.colorToRGBA('black'), {
r : 0,
g : 0,
b : 0,
a : 1
});
assert.deepEqual(Konva.Util.colorToRGBA('#ffcc00'), {
r : 255,
g : 204,
b : 0,
a : 1
});
assert.deepEqual(Konva.Util.colorToRGBA(), {
r : 0,
g : 0,
b : 0,
a : 1
});
});
});