mirror of
https://github.com/konvajs/konva.git
synced 2026-01-23 13:26:07 +08:00
clean up
This commit is contained in:
@@ -174,7 +174,8 @@ suite('Image', function() {
|
||||
});
|
||||
|
||||
// ======================================================
|
||||
test.skip('image with svg source', function(done) {
|
||||
// TODO: what can we test here?
|
||||
test('image with svg source', function(done) {
|
||||
var imageObj = new Image();
|
||||
|
||||
var stage = addStage();
|
||||
|
||||
@@ -240,7 +240,7 @@ suite('Label', function() {
|
||||
|
||||
stage.add(layer);
|
||||
|
||||
cloneAndCompareLayer(layer, 100);
|
||||
cloneAndCompareLayer(layer, 250);
|
||||
});
|
||||
|
||||
test('tag should list text size changes', function() {
|
||||
|
||||
@@ -289,29 +289,6 @@ suite('Line', function() {
|
||||
});
|
||||
});
|
||||
|
||||
// should we calculate client rect for line differently?
|
||||
test.skip('getClientRect rotated', function() {
|
||||
var stage = addStage();
|
||||
var layer = new Konva.Layer();
|
||||
|
||||
var line = new Konva.Line({
|
||||
x: 20,
|
||||
y: 20,
|
||||
rotation: 45,
|
||||
points: [0, 0, 50, 50],
|
||||
closed: true,
|
||||
stroke: '#0f0'
|
||||
});
|
||||
layer.add(line);
|
||||
stage.add(layer);
|
||||
|
||||
var rect = line.getClientRect();
|
||||
assert.equal(rect.x, 19, 'check x');
|
||||
assert.equal(rect.y, 19, 'check y');
|
||||
// assert.equal(rect.width, 2, 'check width');
|
||||
assert.equal(rect.height, 52, 'check height');
|
||||
});
|
||||
|
||||
test('getClientRect with tension', function() {
|
||||
var stage = addStage();
|
||||
var layer = new Konva.Layer();
|
||||
@@ -337,7 +314,7 @@ suite('Line', function() {
|
||||
assert.equal(client.height, 227, 'check height');
|
||||
});
|
||||
|
||||
test.skip('getClientRect with low number of points', function() {
|
||||
test('getClientRect with low number of points', function() {
|
||||
var stage = addStage();
|
||||
var layer = new Konva.Layer();
|
||||
stage.add(layer);
|
||||
@@ -360,11 +337,12 @@ suite('Line', function() {
|
||||
assert.equal(client.height, 2, 'check height');
|
||||
|
||||
line.points([10, 10]);
|
||||
client = line.getClientRect();
|
||||
|
||||
assert.equal(client.x, 10, 'check x');
|
||||
assert.equal(client.y, 10, 'check y');
|
||||
assert.equal(client.width, 0, 'check width');
|
||||
assert.equal(client.height, 0, 'check height');
|
||||
assert.equal(client.x, 9, 'check x');
|
||||
assert.equal(client.y, 9, 'check y');
|
||||
assert.equal(client.width, 2, 'check width');
|
||||
assert.equal(client.height, 2, 'check height');
|
||||
});
|
||||
|
||||
test('line caching', function() {
|
||||
|
||||
@@ -400,7 +400,7 @@ suite('Sprite', function() {
|
||||
imageObj.src = 'assets/scorpion-sprite.png';
|
||||
});
|
||||
|
||||
// need fix, but who is using sprites??
|
||||
// need fix.
|
||||
test.skip('can change frame rate on fly', function(done) {
|
||||
var imageObj = new Image();
|
||||
imageObj.onload = function() {
|
||||
|
||||
Reference in New Issue
Block a user