Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kityminder-core
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
吴志俊
kityminder-core
Commits
49b9cafa
Commit
49b9cafa
authored
Feb 12, 2014
by
Akikonata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
edf896fe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
layout.default.js
src/module/layout.default.js
+5
-3
No files found.
src/module/layout.default.js
View file @
49b9cafa
...
...
@@ -170,6 +170,9 @@ KityMinder.registerModule( "LayoutDefault", function () {
var
updateLayoutVertical
=
function
(
node
,
parent
,
action
)
{
var
root
=
minder
.
getRoot
();
var
effectSet
=
[
node
];
if
(
action
===
"remove"
)
{
effectSet
=
[];
}
var
Layout
=
node
.
getData
(
"layout"
);
var
nodeShape
=
node
.
getRenderContainer
();
var
nodeType
=
node
.
getType
();
...
...
@@ -500,7 +503,6 @@ KityMinder.registerModule( "LayoutDefault", function () {
removeNode
:
function
(
nodes
)
{
console
.
log
(
nodes
);
while
(
nodes
.
length
!==
0
)
{
var
_buffer
=
[
nodes
[
0
]
];
var
parent
=
nodes
[
0
].
getParent
();
var
nodeLayout
=
nodes
[
0
].
getData
(
"layout"
);
if
(
parent
.
getType
()
===
"root"
)
{
...
...
@@ -508,19 +510,19 @@ KityMinder.registerModule( "LayoutDefault", function () {
var
index
=
sideList
.
indexOf
(
nodes
[
0
]
);
sideList
.
splice
(
index
,
1
);
}
parent
.
removeChild
(
nodes
[
0
]
);
var
set
=
updateLayoutVertical
(
nodes
[
0
],
parent
,
"remove"
);
for
(
var
j
=
0
;
j
<
set
.
length
;
j
++
)
{
translateNode
(
set
[
j
]
);
updateConnectAndshIcon
(
set
[
j
]
);
}
var
_buffer
=
[
nodes
[
0
]
];
while
(
_buffer
.
length
!==
0
)
{
_buffer
=
_buffer
.
concat
(
_buffer
[
0
].
getChildren
()
);
_buffer
[
0
].
getRenderContainer
().
remove
();
var
Layout
=
_buffer
[
0
].
getData
(
"layout"
);
Layout
.
connect
.
remove
();
Layout
.
shicon
.
remove
();
var
prt
=
_buffer
[
0
].
getParent
();
prt
.
removeChild
(
_buffer
[
0
]
);
//检测当前节点是否在选中的数组中,如果在的话,从选中数组中去除
var
idx
=
nodes
.
indexOf
(
_buffer
[
0
]
);
if
(
idx
!==
-
1
)
{
...
...
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