mirror of
https://github.com/konvajs/konva.git
synced 2025-04-05 20:48:28 +08:00
fixed blob regression bug. added unit test for setTension()
This commit is contained in:
parent
7e660d0587
commit
a3da0211d8
@ -39,9 +39,9 @@ module.exports = function(grunt) {
|
||||
'src/filters/Brighten.js',
|
||||
'src/filters/Invert.js',
|
||||
'src/filters/Blur.js',
|
||||
'src/filters/Mask.js',
|
||||
'src/filters/Mask.js'/*,
|
||||
'src/filters/Colors.js',
|
||||
'src/filters/Convolution.js'
|
||||
'src/filters/Convolution.js'*/
|
||||
];
|
||||
|
||||
var unitTestFiles = [
|
||||
|
@ -92,7 +92,7 @@
|
||||
|
||||
Kinetic.Util.extend(Kinetic.Blob, Kinetic.Shape);
|
||||
|
||||
Kinetic.Node.addGetter(Kinetic.Blob, 'tension', 1);
|
||||
Kinetic.Node.addGetterSetter(Kinetic.Blob, 'tension', 1);
|
||||
/**
|
||||
* get tension
|
||||
* @name getTension
|
||||
|
@ -61,7 +61,9 @@ Test.Modules.BLOB = {
|
||||
|
||||
//console.log(blob1.getPoints())
|
||||
|
||||
|
||||
// test setter
|
||||
blob1.setTension(1.5);
|
||||
test(blob1.getTension() === 1.5, 'blob1 tension should be 1.5');
|
||||
},
|
||||
'add blob and define tension first': function(containerId) {
|
||||
var stage = new Kinetic.Stage({
|
||||
@ -106,7 +108,7 @@ Test.Modules.BLOB = {
|
||||
test(stage.get('Blob')[0].getPoints().length === 4, 'created blob should have 4 points');
|
||||
|
||||
},
|
||||
'add blobs': function(containerId) {
|
||||
'add blobs2': function(containerId) {
|
||||
var stage = new Kinetic.Stage({
|
||||
container: containerId,
|
||||
width: 578,
|
||||
|
Loading…
Reference in New Issue
Block a user