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
5358d690
Commit
5358d690
authored
Jan 14, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
告警闪烁
parent
5f3570b5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
12 deletions
+5
-12
jtopo-editor.js
src/main/webapp/content/javascript/jtopo/js/jtopo-editor.js
+5
-12
No files found.
src/main/webapp/content/javascript/jtopo/js/jtopo-editor.js
View file @
5358d690
...
...
@@ -29,7 +29,6 @@ TopologyPanel.prototype.saveTopology = function (url) {
}
// 获取json
var
topologyJSON
=
editor
.
stage
.
toJson
();
console
.
log
(
topologyJSON
);
return
topologyJSON
;
// 保存拓扑图数据
}
...
...
@@ -100,10 +99,8 @@ TopologyPanel.prototype.loadTopologyByJson = function (topologyJson, backImg) {
}
console
.
log
(
editor
.
utils
.
getAllNodes
());
}
}
catch
(
e
)
{
console
.
error
(
e
)
var
initTopologyJson
=
{
'version'
:
'0.4.8'
,
'wheelZoom'
:
0.95
,
...
...
@@ -605,14 +602,14 @@ TopologyEditor.prototype.init = function (topologyGuid, backImg, topologyJson) {
// 只读模式下单击节点
if
(
event
.
target
instanceof
JTopo
.
Node
&&
editor
.
stageMode
===
'normal'
)
{
console
.
log
(
self
.
currentNode
)
}
else
if
(
event
.
target
instanceof
JTopo
.
Node
&&
editor
.
stageMode
===
'edit'
)
{
console
.
log
(
self
.
currentNode
)
}
else
if
(
event
.
target
instanceof
JTopo
.
Link
&&
editor
.
stageMode
===
'normal'
)
{
console
.
log
(
self
.
currentNode
)
}
else
if
(
event
.
target
instanceof
JTopo
.
Link
&&
editor
.
stageMode
===
'edit'
)
{
console
.
log
(
self
.
currentNode
)
}
else
{
// 单击别的地方
$
(
'.node-tooltip'
).
css
(
'display'
,
'none'
)
...
...
@@ -621,7 +618,6 @@ TopologyEditor.prototype.init = function (topologyGuid, backImg, topologyJson) {
// 双击编辑事件
this
.
scene
.
dbclick
(
function
(
event
)
{
console
.
log
(
"双击"
);
if
(
!
event
.
target
)
{
// 单击舞台空白处
$
(
'.node-tooltip'
).
css
(
'display'
,
'none'
)
...
...
@@ -857,9 +853,7 @@ TopologyEditor.prototype.init = function (topologyGuid, backImg, topologyJson) {
// 按下ctrl进入多选模式,此时选择节点不能画线
$
(
document
).
keydown
(
function
(
e
)
{
console
.
log
(
'键盘事件'
)
if
(
e
.
shiftKey
)
{
// 组合键模式
console
.
log
(
'in'
)
switch
(
e
.
which
)
{
// 放大 shift+=
case
187
:
...
...
@@ -982,7 +976,7 @@ TopologyEditor.prototype.drag = function (modeDiv, drawArea, text) {
// IE只允许KEY为text和URL
event
.
dataTransfer
.
setData
(
'text'
,
backImg
+
';'
+
text
+
';'
+
nodeType
)
}
catch
(
ex
)
{
console
.
log
(
ex
)
}
}
//
...
...
@@ -1070,7 +1064,6 @@ editor.utils = {
node
.
hostId
=
hostId
;
editor
.
scene
.
add
(
node
)
editor
.
currentNode
=
node
;
console
.
log
(
node
);
},
// 重新渲染节点
reloadNode
:
function
(
node
)
{
...
...
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