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 4172071b
authored
Dec 27, 2023
by
liuyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码
1 parent
98ae7bbf
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
9 deletions
public/drawio/extention/js/exApp.js
public/drawio/js/diagramly/App.js
public/drawio/extention/js/exApp.js
View file @
4172071
...
...
@@ -24,13 +24,25 @@ const setIcon = function (itemIcon, dicys, color) {
const
rectTag
=
svgDocument
.
getElementsByTagName
(
'rect'
)[
0
];
const
pathTag
=
svgDocument
.
getElementsByTagName
(
'path'
)[
0
];
const
ellipseTag
=
svgDocument
.
getElementsByTagName
(
'ellipse'
)[
0
];
if
(
rectTag
)
{
if
(
color
)
{
rectTag
.
setAttribute
(
'fill'
,
color
)
}
}
if
(
pathTag
)
{
if
(
color
)
{
pathTag
.
setAttribute
(
'fill'
,
color
)
}
// svgTag.setAttribute('a_23a=', '测试');
}
if
(
ellipseTag
)
{
if
(
color
)
{
ellipseTag
.
setAttribute
(
'fill'
,
color
)
}
}
svgTag
.
style
.
backgroundColor
=
'transparent'
;
// svgTag.setAttribute('a_123', 'a_123');
if
(
dicys
&&
dicys
.
length
>
0
)
{
...
...
@@ -114,6 +126,12 @@ const leftCustomGraph = function(that) {//左侧自定义图形
}
}
})
// const icons = result.data[1].eleDtos[2].icon;
// const item_icon = icons.split("base64,")[1];
// const decode_item_icon = (window.atob) ? atob(item_icon) : Base64.decode(item_icon);//svg解码,为字符串
// const svgDocument = new DOMParser().parseFromString(decode_item_icon, 'text/xml');//svg字符串转标签
// console.log(svgDocument)
},
error
:
function
(
error
)
{
...
...
@@ -137,6 +155,11 @@ const setGraphDefault = function(that) {
//设置画布只能预览
const
setGraphOnlyView
=
function
(
graph
)
{
graph
.
setEnabled
(
false
);
graph
.
setCellsEditable
(
false
);
graph
.
setTooltips
(
false
);
graph
.
setCellsSelectable
(
false
);
graph
.
setConnectable
(
false
);
graph
.
setCellsMovable
(
false
);
graph
.
getCursorForCell
=
function
(
cell
){
//预览时鼠标悬浮到节点时,改变鼠标样式
if
(
cell
!=
null
&&
cell
.
value
!=
null
&&
cell
.
vertex
==
1
)
{
...
...
public/drawio/js/diagramly/App.js
View file @
4172071
...
...
@@ -189,14 +189,8 @@ App = function(editor, container, lightbox)
leftCustomGraph
(
that
);
// var graph = this.editor.graph;
// console.log(graph.setEnabled)
// graph.setEnabled(true);//设置画布只能预览
// graph.getCursorForCell = function(cell){//预览时鼠标悬浮到节点时,改变鼠标样式
// if (cell != null && cell.value != null && cell.vertex ==1 )
// {
// return 'pointer';
// }
// };
// setGraphOnlyView(graph)
};
...
...
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