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 8937b9ce
authored
Jan 23, 2024
by
liuyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改画布
1 parent
db42011a
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
92 additions
and
11 deletions
public/drawio/extention/js/exGraph.js
public/drawio/js/diagramly/App.js
public/drawio/js/diagramly/EditorUi.js
public/drawio/js/diagramly/Menus.js
public/drawio/js/grapheditor/Actions.js
public/drawio/js/grapheditor/EditorUi.js
public/drawio/resources/dia.txt
public/drawio/resources/dia_zh.txt
src/views/archi-view-manage/index.vue
src/views/meta-model-list/index.vue
public/drawio/extention/js/exGraph.js
View file @
8937b9c
...
...
@@ -41,6 +41,8 @@
{
const
leftGraph
=
JSON
.
parse
(
localStorage
.
getItem
(
'leftGraph'
));
this
.
sidebarTitles
=
true
;
//勾选标签
leftGraph
.
forEach
(
item
=>
{
let
fns
=
[];
item
.
eleDtos
.
forEach
(
item2
=>
{
...
...
public/drawio/js/diagramly/App.js
View file @
8937b9c
...
...
@@ -186,9 +186,6 @@ App = function(editor, container, lightbox)
const
that
=
this
;
setGraphDefault
(
that
);
// leftCustomGraph(that);
// var graph = this.editor.graph;
// setGraphOnlyView(graph)
};
...
...
@@ -3736,6 +3733,9 @@ App.prototype.showSplash = function(force)
const
that
=
this
;
initDrawioGraph
(
that
);
var
graph
=
this
.
editor
.
graph
;
setGraphOnlyView
(
graph
);
}
else
if
(
!
mxClient
.
IS_CHROMEAPP
&&
(
this
.
mode
==
null
||
force
))
{
var
rowLimit
=
(
serviceCount
==
4
)
?
2
:
3
;
...
...
@@ -5144,6 +5144,7 @@ App.prototype.fileCreated = function(file, libs, replace, done, clibs, success)
*/
App
.
prototype
.
loadFile
=
function
(
id
,
sameWindow
,
file
,
success
,
force
)
{
if
(
urlParams
[
'openInSameWin'
]
==
'1'
||
navigator
.
standalone
)
{
sameWindow
=
true
;
...
...
@@ -5524,7 +5525,7 @@ App.prototype.loadFile = function(id, sameWindow, file, success, force)
});
var
currentFile
=
this
.
getCurrentFile
();
var
fn
=
mxUtils
.
bind
(
this
,
function
()
{
if
(
force
||
currentFile
==
null
||
!
currentFile
.
isModified
())
...
...
@@ -7300,7 +7301,9 @@ App.prototype.updateHeader = function()
}),
0
);
}
}
const
that
=
this
;
exToolbar
(
this
.
toolbarContainer
);
backGraph
(
that
,
this
.
toolbarContainer
)
}
};
...
...
public/drawio/js/diagramly/EditorUi.js
View file @
8937b9c
...
...
@@ -10569,6 +10569,9 @@
this
.
addMenuItems
(
menu
,
[
'-'
,
'addToScratchpad'
],
null
,
evt
);
}
const
that
=
this
;
lookCurrentDetailsMenu
(
that
,
graph
,
menu
,
evt
);
if
(
graph
.
isSelectionEmpty
()
&&
Editor
.
currentTheme
==
'simple'
)
{
this
.
addMenuItems
(
menu
,
[
'-'
,
'exitGroup'
,
'home'
],
null
,
evt
);
...
...
public/drawio/js/diagramly/Menus.js
View file @
8937b9c
...
...
@@ -3309,6 +3309,8 @@
}
});
lookCurrentDetailsMenuAction
(
editorUi
,
graph
);
editorUi
.
actions
.
addAction
(
'accounts...'
,
function
()
{
editorUi
.
toggleUserPanel
();
...
...
public/drawio/js/grapheditor/Actions.js
View file @
8937b9c
...
...
@@ -557,9 +557,9 @@ Actions.prototype.init = function()
}));
this
.
addAction
(
'selectVertices'
,
function
()
{
graph
.
selectVertices
(
null
,
true
);
},
null
,
null
,
Editor
.
ctrlKey
+
'+Shift+I'
);
this
.
addAction
(
'selectEdges'
,
function
()
{
graph
.
selectEdges
();
},
null
,
null
,
Editor
.
ctrlKey
+
'+Shift+E'
);
this
.
addAction
(
'selectAll'
,
function
()
{
graph
.
selectAll
(
null
,
true
);
},
null
,
null
,
Editor
.
ctrlKey
+
'+A'
);
this
.
addAction
(
'selectAll'
,
function
()
{
graph
.
selectAll
(
null
,
true
);
},
null
,
null
,
Editor
.
ctrlKey
+
'+A'
);
//解释,选择所有图形
this
.
addAction
(
'selectNone'
,
function
()
{
graph
.
clearSelection
();
},
null
,
null
,
Editor
.
ctrlKey
+
'+Shift+A'
);
this
.
addAction
(
'lockUnlock'
,
function
()
this
.
addAction
(
'lockUnlock'
,
function
()
//解释,图形的锁定
{
if
(
!
graph
.
isSelectionEmpty
())
{
...
...
public/drawio/js/grapheditor/EditorUi.js
View file @
8937b9c
...
...
@@ -2230,7 +2230,7 @@ EditorUi.prototype.createShapePicker = function(x, y, source, callback, directio
/**
* Creates a temporary graph instance for rendering off-screen content.
*/
EditorUi
.
prototype
.
getCellsForShapePicker
=
function
(
cell
,
hovering
,
showEdges
)
EditorUi
.
prototype
.
getCellsForShapePicker
=
function
(
cell
,
hovering
,
showEdges
)
//解释,画布空白处双击或者移动到图形边缘出现图形提示的弹框
{
var
graph
=
this
.
editor
.
graph
;
...
...
@@ -2313,7 +2313,76 @@ EditorUi.prototype.getCellsForShapePicker = function(cell, hovering, showEdges)
return
cells
;
};
EditorUi
.
prototype
.
getCellsForShapePicker
=
function
(
cell
,
hovering
,
showEdges
)
//二次开发,重写画布空白处双击或者移动到图形边缘出现图形提示的弹框
{
var
graph
=
this
.
editor
.
graph
;
var
createVertex
=
mxUtils
.
bind
(
this
,
function
(
style
,
w
,
h
,
value
)
{
return
graph
.
createVertex
(
null
,
null
,
value
||
''
,
0
,
0
,
w
||
120
,
h
||
60
,
style
,
false
);
});
var
createEdge
=
mxUtils
.
bind
(
this
,
function
(
style
,
y
,
value
)
{
var
cell
=
new
mxCell
(
value
||
''
,
new
mxGeometry
(
0
,
0
,
graph
.
defaultEdgeLength
+
20
,
0
),
style
);
cell
.
geometry
.
setTerminalPoint
(
new
mxPoint
(
0
,
0
),
true
);
cell
.
geometry
.
setTerminalPoint
(
new
mxPoint
(
cell
.
geometry
.
width
,
(
y
!=
null
)
?
y
:
0
),
false
);
cell
.
geometry
.
points
=
(
y
!=
null
)
?
[
new
mxPoint
(
cell
.
geometry
.
width
/
2
,
y
)]
:
[];
cell
.
geometry
.
relative
=
true
;
cell
.
edge
=
true
;
return
cell
;
});
if
(
cell
!=
null
)
{
try
{
cell
=
graph
.
cloneCell
(
cell
);
if
(
graph
.
model
.
isVertex
(
cell
)
&&
cell
.
geometry
!=
null
)
{
cell
.
geometry
.
x
=
0
;
cell
.
geometry
.
y
=
0
;
}
}
catch
(
e
)
{
cell
=
null
;
}
}
var
cells
=
[
cell
,
createVertex
(
'whiteSpace=wrap;html=1;'
),
createVertex
(
'ellipse;whiteSpace=wrap;html=1;'
,
80
,
80
),
createVertex
(
'rhombus;whiteSpace=wrap;html=1;'
,
80
,
80
),
createVertex
(
'rounded=1;whiteSpace=wrap;html=1;'
),
createVertex
(
'shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;'
),
createVertex
(
'shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;'
,
120
,
60
),
createVertex
(
'shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;'
,
120
,
80
),
createVertex
(
'shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;'
,
120
,
80
),
createVertex
(
'shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;'
),
createVertex
(
'triangle;whiteSpace=wrap;html=1;'
,
60
,
80
),
createVertex
(
'shape=document;whiteSpace=wrap;html=1;boundedLbl=1;'
,
120
,
80
),
createVertex
(
'shape=tape;whiteSpace=wrap;html=1;'
,
120
,
100
),
createVertex
(
'ellipse;shape=cloud;whiteSpace=wrap;html=1;'
,
120
,
80
),
createVertex
(
'shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;'
,
80
,
60
),
createVertex
(
'shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;'
+
'rotatable=0;perimeter=centerPerimeter;snapToPoint=1;'
,
20
,
20
)];
if
(
showEdges
)
{
cells
=
cells
.
concat
([
createEdge
(
'edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;'
),
createEdge
(
'edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;endArrow=classic;startArrow=classic;endSize=8;startSize=8;'
),
createEdge
(
'edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;'
),
createEdge
(
'edgeStyle=segmentEdgeStyle;endArrow=classic;html=1;curved=0;rounded=0;endSize=8;startSize=8;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;'
,
this
.
editor
.
graph
.
defaultEdgeLength
/
2
)
]);
}
if
(
cell
==
null
)
{
cells
=
[];
}
return
cells
;
};
/**
* Creates a temporary graph instance for rendering off-screen content.
*/
...
...
public/drawio/resources/dia.txt
View file @
8937b9c
...
...
@@ -484,6 +484,7 @@ link=Link
links=Links
loading=Loading
lockUnlock=Lock/Unlock
lookCurrentDetails=lookCurrentDetails
loggedOut=Logged Out
logIn=log in
loveIt=I love {1}
...
...
public/drawio/resources/dia_zh.txt
View file @
8937b9c
...
...
@@ -484,6 +484,7 @@ link=连接
links=连接
loading=加载中
lockUnlock=锁定 / 解锁
lookCurrentDetails=下钻数据
loggedOut=注销
logIn=登录
loveIt=我爱 {1}
...
...
src/views/archi-view-manage/index.vue
View file @
8937b9c
...
...
@@ -554,7 +554,7 @@ export default {
}
}
.card_item
{
width
:
3
50
px
;
width
:
3
45
px
;
height
:
240px
;
margin
:
15px
;
background-color
:
#F2FFFE
;
...
...
src/views/meta-model-list/index.vue
View file @
8937b9c
...
...
@@ -28,9 +28,9 @@
<i
class=
"el-icon-location"
></i>
{{
item
.
verName
}}
{{
item
.
version
}}
</div>
<div
class=
"card_icon"
@
click
.
stop=
"deleteItem(item)"
>
<
!--
<
div
class=
"card_icon"
@
click
.
stop=
"deleteItem(item)"
>
<i
class=
"el-icon-delete"
></i>
</div>
</div>
-->
</div>
</el-card>
</div>
...
...
@@ -436,7 +436,7 @@ export default {
}
.card_item
{
display
:
inline-block
;
width
:
3
50
px
;
width
:
3
28
px
;
height
:
240px
;
margin
:
15px
;
background-color
:
#F2FFFE
;
...
...
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