fix: delete unnecessary console

This commit is contained in:
Yanyan-Wang 2019-12-16 17:02:56 +08:00 committed by Moyee
parent b419ad6c7c
commit d3da98d5ce
2 changed files with 1 additions and 7 deletions

View File

@ -121,7 +121,6 @@ const singleEdge: ShapeOptions = {
style.y = offsetStyle.y; style.y = offsetStyle.y;
style.rotate = offsetStyle.rotate; style.rotate = offsetStyle.rotate;
style.textAlign = this._getTextAlign(labelPosition, offsetStyle.angle); style.textAlign = this._getTextAlign(labelPosition, offsetStyle.angle);
console.log('get style by position', labelPosition, style);
return style; return style;
}, },
// 获取文本对齐方式 // 获取文本对齐方式
@ -177,7 +176,6 @@ const singleEdge: ShapeOptions = {
const label = group.addShape('text', { const label = group.addShape('text', {
attrs: labelStyle attrs: labelStyle
}); });
console.log('edge draw label', label);
return label; return label;
} }
}; };

View File

@ -53,11 +53,8 @@ describe('shape edge test', () => {
// label: '这是一条线' // label: '这是一条线'
// }, group); // }, group);
// console.log(shape.attr('path').length);
// expect(shape.attr('path').length).toEqual(2); // expect(shape.attr('path').length).toEqual(2);
// const label = group.get('children')[1]; // const label = group.get('children')[1];;
// console.log(label.attr('x'), label.attr('y'));
// console.log(group.getCount());
// expect(shape.attr('path').length).toEqual(2); // expect(shape.attr('path').length).toEqual(2);
// expect(label.attr('x')).toEqual((100 + 150) / 2); // expect(label.attr('x')).toEqual((100 + 150) / 2);
// expect(label.attr('y')).toEqual((100 + 50) / 2); // expect(label.attr('y')).toEqual((100 + 50) / 2);
@ -249,7 +246,6 @@ describe('shape edge test', () => {
// } // }
// }, group); // }, group);
// const label = group.get('children')[1]; // const label = group.get('children')[1];
// console.log('labellabellabellabel', label, label.attr('textAlign'));
// expect(label.attr('textAlign')).toEqual('center'); // expect(label.attr('textAlign')).toEqual('center');
// expect(label.attr('stroke')).toEqual('white'); // expect(label.attr('stroke')).toEqual('white');