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 c725af75
authored
Jan 23, 2024
by
liuyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改画布
1 parent
8937b9ce
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
44 deletions
public/drawio/extention/js/exMenus.js
public/drawio/extention/js/exMenus.js
View file @
c725af7
function
lookCurrentDetailsMenu
(
that
,
graph
,
menu
,
evt
)
{
//添加下钻数据按钮
var
exToolbar
=
function
(
toolbarContainer
)
{
if
(
!
graph
.
isSelectionEmpty
())
{
this
.
toggleElement
=
document
.
createElement
(
'a'
);
that
.
addMenuItems
(
menu
,
[
'-'
,
'lookCurrentDetails'
],
null
,
evt
);
this
.
toggleElement
.
setAttribute
(
'title'
,
'版本发布'
);
this
.
toggleElement
.
style
.
position
=
'absolute'
;
this
.
toggleElement
.
style
.
display
=
'inline-block'
;
this
.
toggleElement
.
style
.
width
=
'100px'
;
this
.
toggleElement
.
style
.
height
=
'16px'
;
this
.
toggleElement
.
style
.
color
=
'#666'
;
this
.
toggleElement
.
style
.
top
=
'6px'
;
this
.
toggleElement
.
style
.
right
=
'10px'
;
this
.
toggleElement
.
style
.
padding
=
'2px'
;
this
.
toggleElement
.
style
.
fontSize
=
'14px'
;
this
.
toggleElement
.
style
.
textDecoration
=
'none'
;
this
.
toggleElement
.
text
=
'版本发布'
;
this
.
toggleElement
.
style
.
marginRight
=
'100px'
;
this
.
toggleElement
.
style
.
cursor
=
'pointer'
;
this
.
toggleElement
.
style
.
color
=
'rgb(13,134,127)'
;
this
.
toggleElement
.
style
.
backgroundPosition
=
'50% 50%'
;
this
.
toggleElement
.
style
.
backgroundRepeat
=
'no-repeat'
;
// Prevents focus
mxEvent
.
addListener
(
this
.
toggleElement
,
(
mxClient
.
IS_POINTER
)
?
'pointerdown'
:
'mousedown'
,
mxUtils
.
bind
(
this
,
function
(
evt
)
{
evt
.
preventDefault
();
}));
// Toggles compact mode
mxEvent
.
addListener
(
this
.
toggleElement
,
'click'
,
mxUtils
.
bind
(
this
,
function
(
evt
)
{
window
.
parent
.
postMessage
({
type
:
'saveVersion'
},
'*'
);
}));
if
(
Editor
.
currentTheme
!=
'atlas'
)
{
toolbarContainer
.
appendChild
(
this
.
toggleElement
);
}
}
}
// Enable compact mode for small screens except for Firefox where the height is wrong
function
lookCurrentDetailsMenuAction
(
editorUi
,
graph
)
{
//下钻数据按钮点击操作
if
(
!
mxClient
.
IS_FF
&&
screen
.
height
<=
740
&&
typeof
this
.
toggleElement
.
click
!==
'undefined'
)
{
editorUi
.
actions
.
addAction
(
'lookCurrentDetails'
,
function
(
evt
)
window
.
setTimeout
(
mxUtils
.
bind
(
this
,
function
()
{
{
this
.
toggleElement
.
click
();
editorUi
.
spinner
.
spin
(
document
.
body
,
mxResources
.
get
(
'loading'
));
}),
0
);
}
// 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);
// }
});
}
}
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