Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
smart
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangqinghua
smart
Commits
137bba90
Commit
137bba90
authored
Jan 11, 2019
by
xiaowenjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改拓扑图
parent
896cdede
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
jtopo-editor.js
src/main/webapp/content/javascript/jtopo/js/jtopo-editor.js
+9
-7
No files found.
src/main/webapp/content/javascript/jtopo/js/jtopo-editor.js
View file @
137bba90
...
@@ -161,7 +161,7 @@ function TopologyEditor() {
...
@@ -161,7 +161,7 @@ function TopologyEditor() {
linkFont
:
'12px Consolas'
,
// 节点字体
linkFont
:
'12px Consolas'
,
// 节点字体
linkFontColor
:
'red'
,
// 连线文字颜色,如"255,255,0"
linkFontColor
:
'red'
,
// 连线文字颜色,如"255,255,0"
linkArrowsRadius
:
0
,
// 线条箭头半径
linkArrowsRadius
:
0
,
// 线条箭头半径
linkDefaultWidth
:
3
,
// 连线宽度
linkDefaultWidth
:
2
,
// 连线宽度
linkOffsetGap
:
80
,
// 折线拐角处的长度
linkOffsetGap
:
80
,
// 折线拐角处的长度
linkDirection
:
'horizontal'
,
// 折线的方向
linkDirection
:
'horizontal'
,
// 折线的方向
// Container属性
// Container属性
...
@@ -840,9 +840,11 @@ TopologyEditor.prototype.init = function (topologyGuid, backImg, topologyJson) {
...
@@ -840,9 +840,11 @@ TopologyEditor.prototype.init = function (topologyGuid, backImg, topologyJson) {
// 按下ctrl进入多选模式,此时选择节点不能画线
// 按下ctrl进入多选模式,此时选择节点不能画线
$
(
document
).
keydown
(
function
(
e
)
{
$
(
document
).
keydown
(
function
(
e
)
{
console
.
log
(
'键盘事件'
)
if
(
e
.
shiftKey
)
{
// 组合键模式
if
(
e
.
shiftKey
)
{
// 组合键模式
console
.
log
(
'in'
)
switch
(
e
.
which
)
{
switch
(
e
.
which
)
{
// 放大
ctrl
+=
// 放大
shift
+=
case
187
:
case
187
:
case
61
:
case
61
:
// 单个节点可以撤销操作
// 单个节点可以撤销操作
...
@@ -855,7 +857,7 @@ TopologyEditor.prototype.init = function (topologyGuid, backImg, topologyJson) {
...
@@ -855,7 +857,7 @@ TopologyEditor.prototype.init = function (topologyGuid, backImg, topologyJson) {
editor
.
utils
.
scalingBig
()
editor
.
utils
.
scalingBig
()
}
}
break
break
// 缩小
ctrl
+-
// 缩小
shift
+-
case
189
:
case
189
:
case
173
:
case
173
:
if
(
editor
.
currentNode
instanceof
JTopo
.
Node
)
{
if
(
editor
.
currentNode
instanceof
JTopo
.
Node
)
{
...
@@ -868,7 +870,7 @@ TopologyEditor.prototype.init = function (topologyGuid, backImg, topologyJson) {
...
@@ -868,7 +870,7 @@ TopologyEditor.prototype.init = function (topologyGuid, backImg, topologyJson) {
}
}
break
break
case
70
:
case
70
:
//
ctrl
+f 全屏显示
//
shift
+f 全屏显示
editor
.
utils
.
showInFullScreen
(
editor
.
stage
.
canvas
,
'RequestFullScreen'
)
editor
.
utils
.
showInFullScreen
(
editor
.
stage
.
canvas
,
'RequestFullScreen'
)
break
break
case
72
:
case
72
:
...
@@ -876,7 +878,7 @@ TopologyEditor.prototype.init = function (topologyGuid, backImg, topologyJson) {
...
@@ -876,7 +878,7 @@ TopologyEditor.prototype.init = function (topologyGuid, backImg, topologyJson) {
// alert('帮助文档')
// alert('帮助文档')
break
break
case
71
:
case
71
:
//
ctrl
+g 居中显示
//
shift
+g 居中显示
editor
.
utils
.
showInCenter
()
editor
.
utils
.
showInCenter
()
break
break
case
73
:
case
73
:
...
@@ -891,7 +893,7 @@ TopologyEditor.prototype.init = function (topologyGuid, backImg, topologyJson) {
...
@@ -891,7 +893,7 @@ TopologyEditor.prototype.init = function (topologyGuid, backImg, topologyJson) {
editor
.
utils
.
cloneSelectedNodes
()
editor
.
utils
.
cloneSelectedNodes
()
break
break
case
80
:
case
80
:
//
ctrl
+ p
//
shif
+ p
editor
.
utils
.
showPic
()
editor
.
utils
.
showPic
()
break
break
case
82
:
case
82
:
...
@@ -901,7 +903,7 @@ TopologyEditor.prototype.init = function (topologyGuid, backImg, topologyJson) {
...
@@ -901,7 +903,7 @@ TopologyEditor.prototype.init = function (topologyGuid, backImg, topologyJson) {
}
}
break
break
case
83
:
case
83
:
//
ctrl
+s 保存
//
shif
+s 保存
editor
.
saveTopology
(
true
)
editor
.
saveTopology
(
true
)
break
break
case
85
:
case
85
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment