Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
liangzhen
/
framework-tools-web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 7bd34f4a
authored
Nov 28, 2023
by
liuyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
1 parent
6f001c09
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
27 deletions
public/drawio/js/diagramly/DevTools.js
public/drawio/js/diagramly/Dialogs.js
public/drawio/js/diagramly/sidebar/Sidebar.js
public/drawio/js/grapheditor/Format.js
public/drawio/styles/grapheditor.css
public/drawio/js/diagramly/DevTools.js
View file @
7bd34f4
...
...
@@ -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;
};
...
...
public/drawio/js/diagramly/Dialogs.js
View file @
7bd34f4
...
...
@@ -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"
));
...
...
public/drawio/js/diagramly/sidebar/Sidebar.js
View file @
7bd34f4
...
...
@@ -860,7 +860,7 @@
this
.
createdSearchIndex
=
[];
}
// this.addSearchPalette(true);//二次开发,去掉
搜索栏
this
.
addSearchPalette
(
true
);
//二次开发,显示
搜索栏
// Adds custom sections first
if
(
this
.
customEntries
!=
null
)
...
...
public/drawio/js/grapheditor/Format.js
View file @
7bd34f4
...
...
@@ -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
;
input
.
addEventListener
(
"blur"
,
function
(
e
)
{
const
value_
=
e
.
target
.
value
;
graph
.
getModel
().
setValue
(
graph
.
getSelectionCell
(),
value_
);
//修改节点名称
const
nameDiv
=
document
.
createElement
(
"div"
);
nameDiv
.
style
.
marginLeft
=
'20px'
;
nameDiv
.
innerHTML
=
nodeName
;
// 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_
);
...
...
public/drawio/styles/grapheditor.css
View file @
7bd34f4
...
...
@@ -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;
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment