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
e9cd07b2
Commit
e9cd07b2
authored
Jan 23, 2014
by
Akikonata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bug
parent
d2a737a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
minder.select.js
src/core/minder.select.js
+4
-4
No files found.
src/core/minder.select.js
View file @
e9cd07b2
...
...
@@ -34,7 +34,7 @@ kity.extendClass( Minder, function () {
select
:
function
(
nodes
)
{
this
.
removeAllSelectedNodes
();
var
me
=
this
;
utils
.
each
(
u
tils
.
isArray
(
nodes
)
?
nodes
:
[
nodes
],
function
(
i
,
n
)
{
Utils
.
each
(
U
tils
.
isArray
(
nodes
)
?
nodes
:
[
nodes
],
function
(
i
,
n
)
{
me
.
_selectedNodes
.
push
(
n
);
highlightNode
(
me
,
n
);
}
);
...
...
@@ -42,15 +42,15 @@ kity.extendClass( Minder, function () {
},
addSelect
:
function
(
node
)
{
var
me
=
this
;
me
.
_selectedNodes
.
push
(
node
);
if
(
me
.
_selectedNodes
.
indexOf
(
node
)
===
-
1
)
me
.
_selectedNodes
.
push
(
node
);
highlightNode
(
me
,
node
);
},
isNodeSelected
:
function
(
node
)
{
return
node
.
getData
(
'highlight'
)
===
true
return
node
.
getData
(
'highlight'
)
===
true
;
},
//当前选区中的节点在给定的节点范围内的保留选中状态,没在给定范围的取消选中,给定范围中的但没在当前选中范围的也做选中效果
toggleSelect
:
function
(
nodes
)
{
nodes
=
u
tils
.
isArray
(
nodes
)
?
nodes
:
[
nodes
];
nodes
=
U
tils
.
isArray
(
nodes
)
?
nodes
:
[
nodes
];
var
selectedNodes
=
this
.
getSelectedNodes
().
slice
(
0
);
this
.
removeAllSelectedNodes
();
for
(
var
i
=
0
,
n
;
n
=
selectedNodes
[
i
];
)
{
...
...
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