Commit 7bd34f4a by liuyong

修改bug

1 parent 6f001c09
......@@ -10,6 +10,7 @@ if (urlParams['dev'] == '1')
Graph.prototype.getTooltipForCell = function(cell)
{
var tip = graphGetTooltipForCell.apply(this, arguments);
// console.log(tip)
var geo = this.getCellGeometry(cell);
tip += ((tip.length > 0) ? '<br>' : '') + 'id=' + cell.id + '<br>';
......@@ -68,6 +69,7 @@ if (urlParams['dev'] == '1')
tip += '<br>style=<div style="display:inline-block;vertical-align:bottom;white-space:nowrap;width:480px;overflow:hidden;text-overflow:ellipsis;">' + cell.style + '</span>';
}
}
return null;//二次开发,取消鼠标移动到图形上出现的提示框
// return tip;
};
......
......@@ -11720,7 +11720,7 @@ var TemplatesDialog = function(editorUi, callback, cancelCallback,
editorUi.sidebar.hideTooltip();
editorUi.sidebar.currentElt = elt;
loading = true;
img.src = '/images/aui-wait.gif';
img.src = '../../images/aui-wait.gif';
function renderXML(xml)
{
......@@ -11730,7 +11730,7 @@ var TemplatesDialog = function(editorUi, callback, cancelCallback,
}
loading = false;
img.src = '/images/icon-search.svg';
img.src = '../../images/icon-search.svg';
};
if (diagram.isExt)
......@@ -11739,7 +11739,7 @@ var TemplatesDialog = function(editorUi, callback, cancelCallback,
{
showError(mxResources.get('cantLoadPrev'));
loading = false;
img.src = '/images/icon-search.svg';
img.src = '../../images/icon-search.svg';
});
}
else
......@@ -11997,7 +11997,7 @@ var TemplatesDialog = function(editorUi, callback, cancelCallback,
var row = document.createElement('tr');
var td = document.createElement('td');
var prevImg = document.createElement('img');
prevImg.src = "/images/icon-search.svg";
prevImg.src = "../../images/icon-search.svg";
prevImg.className = "geTempDlgDiagramListPreviewBtn";
prevImg.setAttribute('title', mxResources.get("preview"));
......@@ -12092,7 +12092,7 @@ var TemplatesDialog = function(editorUi, callback, cancelCallback,
tile.appendChild(lblDiv);
var prevImg = document.createElement('img');
prevImg.src = "/images/icon-search.svg";
prevImg.src = "../../images/icon-search.svg";
prevImg.className = "geTempDlgDiagramPreviewBtn";
prevImg.setAttribute('title', mxResources.get("preview"));
......
......@@ -860,7 +860,7 @@
this.createdSearchIndex = [];
}
// this.addSearchPalette(true);//二次开发,去掉搜索栏
this.addSearchPalette(true);//二次开发,显示搜索栏
// Adds custom sections first
if (this.customEntries != null)
......
......@@ -1558,25 +1558,27 @@ AttributePanel.prototype.init = function()//二次开发,属性面板内容
const objectTag = graph.getSelectionCell().value;
const nodeName = typeof objectTag == 'string' ? objectTag : objectTag.getAttribute('label');
const labelName = graph.getLabel(graph.getSelectionCell());//获取节点名称
const nodeName = labelName.replace(/<[^>]+>/g, '');
var div = document.createElement('div');
div.style.cssText = 'padding: 8px;display: flex;align-items: center;justify-content: space-around;';
div.style.cssText = 'padding: 8px;display: flex;align-items: center;';
const div2 = document.createElement('div');
div2.innerHTML = '节点名称: ';
div.appendChild(div2);
const labelDiv = document.createElement('div');
labelDiv.innerHTML = '节点名称: ';
div.appendChild(labelDiv);
const input = document.createElement("input");
input.type = "text";
input.value = nodeName;
const nameDiv = document.createElement("div");
nameDiv.style.marginLeft = '20px';
nameDiv.innerHTML = nodeName;
input.addEventListener("blur", function(e) {
const value_ = e.target.value;
graph.getModel().setValue(graph.getSelectionCell(), value_);//修改节点名称
// graph.getModel().setValue(graph.getSelectionCell(), value_);//修改节点名称
});
div.appendChild(input);
// input.addEventListener("blur", function(e) {
// const value_ = e.target.value;
// });
div.appendChild(nameDiv);
this.container.appendChild(div);
......@@ -1604,9 +1606,7 @@ AttributePanel.prototype.addListPanel = function(container)
nodeName.forEach((item, index) => {
const itemContainer = document.createElement('div');
itemContainer.style.display = 'flex';
itemContainer.style.alignItems = 'center';
itemContainer.style.justifyContent = 'space-around';
itemContainer.style.cssText = 'padding: 8px;display: flex;align-items: center;';
const nameDiv = document.createElement('div');
nameDiv.innerHTML = item + ': ';
......@@ -1615,6 +1615,8 @@ AttributePanel.prototype.addListPanel = function(container)
const input = document.createElement("input");
input.type = "text";
input.value = nodeValue[index];
input.style.marginLeft = '20px';
input.addEventListener("blur", function(e) {
const value_ = e.target.value;
objectTag.setAttribute(item, value_);
......
......@@ -1097,7 +1097,7 @@ table.geProperties tr td {
}
.geTempDlgSearchBox {
color:#888888;
background:url("/images/icon-search.svg") no-repeat;
background:url("../images/icon-search.svg") no-repeat;
background-color: #FFFFFF;
background-position: 15px;
height: 40px;
......@@ -1181,7 +1181,7 @@ table.geProperties tr td {
}
.geTempDlgBtnBusy {
background-image: url(/images/aui-wait.gif);
background-image: url(../images/aui-wait.gif);
background-repeat: no-repeat;
background-position: 62px 7px;
}
......@@ -1444,13 +1444,13 @@ table.geProperties tr td {
}
.geTempDlgDiagramTileImgLoading {
background-image: url(/images/aui-wait.gif);
background-image: url(../images/aui-wait.gif);
background-repeat: no-repeat;
background-position: center;
}
.geTempDlgDiagramTileImgError {
background-image: url(/images/broken.png);
background-image: url(../images/broken.png);
background-repeat: no-repeat;
background-position: center;
background-color: #be3730;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!