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
8ac4e2ef
Commit
8ac4e2ef
authored
Feb 18, 2014
by
Akikonata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bug
parent
003f8207
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
layout.default.js
src/module/layout.default.js
+4
-0
layout.js
src/module/layout.js
+2
-1
No files found.
src/module/layout.default.js
View file @
8ac4e2ef
...
@@ -543,6 +543,10 @@ KityMinder.registerModule( "LayoutDefault", function () {
...
@@ -543,6 +543,10 @@ KityMinder.registerModule( "LayoutDefault", function () {
removeNode
:
function
(
nodes
)
{
removeNode
:
function
(
nodes
)
{
while
(
nodes
.
length
!==
0
)
{
while
(
nodes
.
length
!==
0
)
{
var
parent
=
nodes
[
0
].
getParent
();
var
parent
=
nodes
[
0
].
getParent
();
if
(
!
parent
)
{
nodes
.
splice
(
0
,
1
);
return
false
;
}
var
nodeLayout
=
nodes
[
0
].
getLayout
();
var
nodeLayout
=
nodes
[
0
].
getLayout
();
if
(
parent
.
getType
()
===
"root"
)
{
if
(
parent
.
getType
()
===
"root"
)
{
var
sideList
=
parent
.
getLayout
()[
nodeLayout
.
appendside
+
"List"
];
var
sideList
=
parent
.
getLayout
()[
nodeLayout
.
appendside
+
"List"
];
...
...
src/module/layout.js
View file @
8ac4e2ef
...
@@ -132,6 +132,7 @@ KityMinder.registerModule( "LayoutModule", function () {
...
@@ -132,6 +132,7 @@ KityMinder.registerModule( "LayoutModule", function () {
base
:
Command
,
base
:
Command
,
execute
:
function
(
km
)
{
execute
:
function
(
km
)
{
var
selectedNodes
=
km
.
getSelectedNodes
();
var
selectedNodes
=
km
.
getSelectedNodes
();
if
(
selectedNodes
.
length
===
0
)
return
false
;
var
_buffer
=
[];
var
_buffer
=
[];
for
(
var
i
=
0
;
i
<
selectedNodes
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
selectedNodes
.
length
;
i
++
)
{
_buffer
.
push
(
selectedNodes
[
i
]
);
_buffer
.
push
(
selectedNodes
[
i
]
);
...
@@ -140,7 +141,7 @@ KityMinder.registerModule( "LayoutModule", function () {
...
@@ -140,7 +141,7 @@ KityMinder.registerModule( "LayoutModule", function () {
var
parent
=
_buffer
[
0
].
getParent
();
var
parent
=
_buffer
[
0
].
getParent
();
if
(
parent
&&
_buffer
.
indexOf
(
parent
)
===
-
1
)
_buffer
.
push
(
parent
);
if
(
parent
&&
_buffer
.
indexOf
(
parent
)
===
-
1
)
_buffer
.
push
(
parent
);
_buffer
.
shift
();
_buffer
.
shift
();
}
while
(
_buffer
.
length
!==
1
);
}
while
(
_buffer
.
length
>
1
);
km
.
removeNode
(
selectedNodes
);
km
.
removeNode
(
selectedNodes
);
km
.
select
(
_buffer
[
0
]
);
km
.
select
(
_buffer
[
0
]
);
}
}
...
...
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