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 7129ffe7
authored
Jan 24, 2024
by
liuyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改画布
1 parent
d92061af
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
58 additions
and
40 deletions
public/drawio/extention/js/exApp.js
public/drawio/extention/js/exMenus.js
public/drawio/js/diagramly/EditorUi.js
public/drawio/js/diagramly/Menus.js
public/drawio/resources/dia.txt
public/drawio/resources/dia_zh.txt
public/drawio/extention/js/exApp.js
View file @
7129ffe
...
...
@@ -246,28 +246,18 @@ var backGraph = function (that, toolbarContainer) {//返回上级图形按钮
// Toggles compact mode
mxEvent
.
addListener
(
this
.
toggleElement
,
'click'
,
mxUtils
.
bind
(
this
,
function
(
evt
)
{
console
.
log
(
'上级图形'
)
// const mockFile = {
// data: `<mxGraphModel dx="1273" dy="619" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
// <root>
// <mxCell id="0"/>
// <mxCell id="1" parent="0"/>
// <mxCell id="NuJ1xgI3z5VlG4THHdq2-1" value="" style="rounded=1;whiteSpace=wrap;html=1;container=1;collapsible=0;;fillColor=#4CD964;attr=[];eleId=5;eaLevel=1;" vertex="1" parent="1">
// <mxGeometry x="110" y="130" width="170" height="85" as="geometry"/>
// </mxCell>
// <mxCell id="NuJ1xgI3z5VlG4THHdq2-2" value="" style="rounded=1;whiteSpace=wrap;html=1;container=1;collapsible=0;;fillColor=#4CD964;attr=[];eleId=5;eaLevel=1;" vertex="1" parent="NuJ1xgI3z5VlG4THHdq2-1">
// <mxGeometry x="20" y="10" width="150" height="75" as="geometry"/>
// </mxCell>
// </root>
// </mxGraphModel>`,
// title: '原始数据'
// };
// that.editor.setStatus('');
// that.fileLoaded(null);
// that.spinner.stop();
// const file = new LocalFile(that, mockFile.data, mockFile.title, null);
console
.
log
(
'上级图形'
);
const
xml
=
localStorage
.
getItem
(
'xmlData'
);
const
mockFile
=
{
data
:
xml
,
title
:
'原始数据'
};
that
.
editor
.
setStatus
(
''
);
that
.
fileLoaded
(
null
);
that
.
spinner
.
stop
();
const
file
=
new
LocalFile
(
that
,
mockFile
.
data
,
mockFile
.
title
,
null
);
//
that.loadFile(`-3`, true, file);
that
.
loadFile
(
`-3`
,
true
,
file
);
}));
...
...
public/drawio/extention/js/exMenus.js
View file @
7129ffe
...
...
@@ -8,25 +8,48 @@ function lookCurrentDetailsMenu(that, graph, menu, evt) {//添加下钻数据按
function
lookCurrentDetailsMenuAction
(
editorUi
,
graph
)
{
//下钻数据按钮点击操作
editorUi
.
actions
.
addAction
(
'lookCurrentDetails'
,
function
(
evt
)
{
editorUi
.
spinner
.
spin
(
document
.
body
,
mxResources
.
get
(
'loading'
));
//
editorUi.spinner.spin(document.body, mxResources.get('loading'));
//
if (!graph.isSelectionEmpty())
//
{
//
console.log('下钻数据')
//
const mockFile = {
//
data: `<mxGraphModel dx="1177" dy="690" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
//
<root>
//
<mxCell id="0"/>
//
<mxCell id="1" parent="0"/>
//
</root>
//
</mxGraphModel>`,
//
title: '下钻数据'
//
}
//
editorUi.editor.setStatus('');
//
editorUi.fileLoaded(null);
//
editorUi.spinner.stop();
//
const file = new LocalFile(editorUi, mockFile.data, mockFile.title, null);
//
editorUi.fileLoaded(file);
//
}
if
(
!
graph
.
isSelectionEmpty
())
{
console
.
log
(
'下钻数据'
)
const
mockFile
=
{
data
:
`<mxGraphModel dx="1177" dy="690" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
</root>
</mxGraphModel>`
,
title
:
'下钻数据'
}
editorUi
.
editor
.
setStatus
(
''
);
editorUi
.
fileLoaded
(
null
);
editorUi
.
spinner
.
stop
();
const
file
=
new
LocalFile
(
editorUi
,
mockFile
.
data
,
mockFile
.
title
,
null
);
editorUi
.
fileLoaded
(
file
);
}
});
}
function
propertyTransferMenu
(
that
,
graph
,
menu
,
evt
)
{
//添加属性传递按钮
if
(
!
graph
.
isSelectionEmpty
())
{
that
.
addMenuItems
(
menu
,
[
'-'
,
'propertyTransfer'
],
null
,
evt
);
}
}
function
propertyTransferMenuAction
(
editorUi
,
graph
)
{
//属性传递按钮点击操作
editorUi
.
actions
.
addAction
(
'propertyTransfer'
,
function
(
evt
)
{
if
(
!
graph
.
isSelectionEmpty
())
{
var
cells
=
graph
.
getSelectionCells
();
// graph.setCellStyles('property', '属性', [cells[0]]);//设置style里面拼接属性
// var style = graph.getCurrentCellStyle(cells[0]);
// console.log(cells);
// console.log(style);
}
});
}
\ No newline at end of file
public/drawio/js/diagramly/EditorUi.js
View file @
7129ffe
...
...
@@ -10571,6 +10571,7 @@
const
that
=
this
;
lookCurrentDetailsMenu
(
that
,
graph
,
menu
,
evt
);
propertyTransferMenu
(
that
,
graph
,
menu
,
evt
);
if
(
graph
.
isSelectionEmpty
()
&&
Editor
.
currentTheme
==
'simple'
)
{
...
...
public/drawio/js/diagramly/Menus.js
View file @
7129ffe
...
...
@@ -3310,6 +3310,7 @@
});
lookCurrentDetailsMenuAction
(
editorUi
,
graph
);
propertyTransferMenuAction
(
editorUi
,
graph
);
editorUi
.
actions
.
addAction
(
'accounts...'
,
function
()
{
...
...
public/drawio/resources/dia.txt
View file @
7129ffe
...
...
@@ -485,6 +485,7 @@ links=Links
loading=Loading
lockUnlock=Lock/Unlock
lookCurrentDetails=lookCurrentDetails
propertyTransfer=propertyTransfer
loggedOut=Logged Out
logIn=log in
loveIt=I love {1}
...
...
public/drawio/resources/dia_zh.txt
View file @
7129ffe
...
...
@@ -485,6 +485,7 @@ links=连接
loading=加载中
lockUnlock=锁定 / 解锁
lookCurrentDetails=下钻数据
propertyTransfer=属性传递
loggedOut=注销
logIn=登录
loveIt=我爱 {1}
...
...
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