react-lineage-dag
Advanced tools
Comparing version 2.0.27 to 2.0.28
{ | ||
"name": "react-lineage-dag", | ||
"version": "2.0.27", | ||
"version": "2.0.28", | ||
"description": "表格/字段血缘React组件", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -91,3 +91,3 @@ import {Node} from 'butterfly-dag'; | ||
redrawTitle() { | ||
$(this.dom).find('.title').remove(); | ||
// $(this.dom).find('.title').remove(); | ||
$(this.dom).find('.operator').remove(); | ||
@@ -140,13 +140,13 @@ this._createTableName($(this.dom), true); | ||
let titleCom = isUpdate ? $(this.dom).find('.title-con') : $('<div class="title-con"></div>'); | ||
let titleDom = null; | ||
let titleDom = isUpdate ? $(this.dom).find('.title') : $('<div class="title"></div>'); | ||
if (this._isRendering) { | ||
return false; | ||
} | ||
// 渲染title | ||
if (titleRender) { | ||
titleDom = $(`<div class="title"></div>`); | ||
this._isRendering = true; | ||
(this._canvas ? this._canvas._renderPromise : Promise.resolve()).then(() => { | ||
this._renderPromise = new Promise((resolve, reject) => { | ||
if (this._isRendering) { | ||
return Promise.resolve(); | ||
} | ||
this._isRendering = true; | ||
ReactDOM.render(titleRender(title, this), titleDom[0], () => { | ||
@@ -173,3 +173,3 @@ if (this.height === 0 || this.width === 0) { | ||
} | ||
titleCom.append(titleDom); | ||
!isUpdate && titleCom.append(titleDom); | ||
resolve(); | ||
@@ -181,3 +181,2 @@ this._isRendering = false; | ||
} else if (title) { | ||
titleDom = $(`<div class="title">${title}</div>`); | ||
titleDom.css({ | ||
@@ -187,3 +186,5 @@ 'height': this.TITLE_HEIGHT + 'px', | ||
}); | ||
titleCom.append(titleDom); | ||
if (!isUpdate) { | ||
titleCom.append(titleDom); | ||
} | ||
} | ||
@@ -190,0 +191,0 @@ |
Sorry, the diff of this file is too big to display
268129
4652