react-lineage-dag
Advanced tools
Comparing version 2.0.7 to 2.0.8
@@ -128,4 +128,4 @@ 'use strict'; | ||
config={{ | ||
titleRender: (title) => { | ||
return <div className="title-test" onClick={() => {console.log('click----')}}>{title}</div> | ||
titleRender: (title, node) => { | ||
return <div className="title-test" onClick={() => {console.log('click----');}}>{title}</div> | ||
}, | ||
@@ -132,0 +132,0 @@ minimap: { |
{ | ||
"name": "react-lineage-dag", | ||
"version": "2.0.7", | ||
"version": "2.0.8", | ||
"description": "表格/字段血缘React组件", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -83,2 +83,7 @@ import {Node} from 'butterfly-dag'; | ||
} | ||
redrawTitle(type) { | ||
$(this.dom).find('title').remove(); | ||
$(this.dom).find('operator').remove(); | ||
this._createTableName($(this.dom), true); | ||
} | ||
_addEventListener() { | ||
@@ -123,3 +128,3 @@ // todo 做事件代理的形式 | ||
} | ||
_createTableName(container = $(this.dom)) { | ||
_createTableName(container = $(this.dom), isUpdate) { | ||
let title = _.get(this, 'options.name'); | ||
@@ -159,17 +164,19 @@ let titleRender = _.get(this, 'options._titleRender'); | ||
let leftPoint = $('<div class="point left-point"></div>'); | ||
let rightPoint = $('<div class="point right-point"></div>'); | ||
titleCom.append(leftPoint).append(rightPoint); | ||
if (!isUpdate) { | ||
let leftPoint = $('<div class="point left-point"></div>'); | ||
let rightPoint = $('<div class="point right-point"></div>'); | ||
titleCom.append(leftPoint).append(rightPoint); | ||
this.titlesList = this.titlesList.concat([{ | ||
id: `${this.id}-left`, | ||
dom: leftPoint[0], | ||
type: 'target' | ||
}, { | ||
id: `${this.id}-right`, | ||
dom: rightPoint[0], | ||
type: 'source' | ||
}]) | ||
this.titlesList = this.titlesList.concat([{ | ||
id: `${this.id}-left`, | ||
dom: leftPoint[0], | ||
type: 'target' | ||
}, { | ||
id: `${this.id}-right`, | ||
dom: rightPoint[0], | ||
type: 'source' | ||
}]); | ||
$(container).append(titleCom); | ||
$(container).append(titleCom); | ||
} | ||
} | ||
@@ -176,0 +183,0 @@ _createFields(container = $(this.dom)) { |
Sorry, the diff of this file is too big to display
242350
4280