fix: unnecessary console

This commit is contained in:
Yanyan-Wang 2019-12-13 16:23:46 +08:00 committed by Moyee
parent b6d4822b8e
commit 3fb089b472
2 changed files with 0 additions and 10 deletions

View File

@ -52,9 +52,7 @@ const ShapeFactoryBase = {
*/
draw(type: string, cfg: ModelConfig, group: G.Group): G.Shape {
const shape = this.getShape(type)
console.log('drawdraw', type, shape);
const rst = shape.draw(cfg, group)
console.log('keyshapekeyshape', rst);
shape.afterDraw(cfg, group, rst)
return rst
},
@ -135,7 +133,6 @@ export default class Shape {
const className = ucfirst(factoryType)
const factoryBase = ShapeFactoryBase
const shapeFactory = Object.assign({}, factoryBase, cfg)
console.log('shapeFactoryshapeFactory', shapeFactory);
Shape[className] = shapeFactory
shapeFactory.className = className
// addRegister(shapeFactory)
@ -162,7 +159,6 @@ export default class Shape {
extendShapeType = extendShapeType ? extendShapeType : 'single-edge'
const extendShape = shapeFactory.getShape(extendShapeType);
const shapeObj = Object.assign({}, extendShape, edgeDefinition)
console.log('shapeObjshapeObjshapeObj', shapeObj, extendShape);
shapeObj['type'] = shapeType
shapeObj['itemType'] = 'edge'
shapeFactory[shapeType] = shapeObj

View File

@ -32,13 +32,11 @@ export const shapeBase: ShapeOptions = {
* @return {G.Shape}
*/
draw(cfg: ModelConfig, group: G.Group): G.Shape {
console.log('draw in single shape mixin');
const shape: G.Shape = this.drawShape(cfg, group)
shape.set('className', this.itemType + CLS_SHAPE_SUFFIX)
if (cfg.label) {
const label = this.drawLabel(cfg, group)
label.set('className', this.itemType + CLS_LABEL_SUFFIX)
console.log('after drawing label', label);
}
return shape
},
@ -56,15 +54,12 @@ export const shapeBase: ShapeOptions = {
const labelCfg = merge({}, defaultLabelCfg, cfg.labelCfg)
const labelStyle = this.getLabelStyle(cfg, labelCfg, group)
console.log('drawing label', labelStyle);
const label = group.addShape('text', {
attrs: labelStyle
})
console.log('groupgroup', group);
return label
},
getLabelStyleByPosition(cfg?: ModelConfig, labelCfg?: ILabelConfig, group?: G.Group): LabelStyle {
console.log('base get label by positions');
return {};
},
/**
@ -79,7 +74,6 @@ export const shapeBase: ShapeOptions = {
const calculateStyle = this.getLabelStyleByPosition(cfg, labelCfg, group)
calculateStyle.text = cfg.label
const attrName = this.itemType + 'Label' // 取 nodeLabeledgeLabel 的配置项
console.log('global', attrName);
const defaultStyle = Global[attrName] ? Global[attrName].style : null
const labelStyle = Object.assign({}, defaultStyle, calculateStyle, labelCfg.style)
return labelStyle