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
781e8706
Commit
781e8706
authored
Feb 13, 2014
by
campaign
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
by zhanyi
parent
7d95683e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
minder.select.js
src/core/minder.select.js
+2
-2
node.js
src/core/node.js
+8
-7
No files found.
src/core/minder.select.js
View file @
781e8706
// 选区管理
// 选区管理
kity
.
extendClass
(
Minder
,
function
()
{
kity
.
extendClass
(
Minder
,
function
()
{
function
highlightNode
(
km
,
node
)
{
function
highlightNode
(
km
,
node
)
{
node
.
set
Attr
(
"highlight"
,
true
);
node
.
set
TmpData
(
"highlight"
,
true
);
km
.
highlightNode
(
node
);
km
.
highlightNode
(
node
);
}
}
function
unhighlightNode
(
km
,
node
)
{
function
unhighlightNode
(
km
,
node
)
{
node
.
set
Attr
(
"highlight"
,
false
);
node
.
set
TmpData
(
"highlight"
,
false
);
km
.
highlightNode
(
node
);
km
.
highlightNode
(
node
);
}
}
return
{
return
{
...
...
src/core/node.js
View file @
781e8706
...
@@ -3,6 +3,7 @@ var MinderNode = KityMinder.MinderNode = kity.createClass( "MinderNode", {
...
@@ -3,6 +3,7 @@ var MinderNode = KityMinder.MinderNode = kity.createClass( "MinderNode", {
this
.
parent
=
null
;
this
.
parent
=
null
;
this
.
children
=
[];
this
.
children
=
[];
this
.
data
=
{};
this
.
data
=
{};
this
.
tmpData
=
{};
if
(
Utils
.
isString
(
options
)
)
{
if
(
Utils
.
isString
(
options
)
)
{
this
.
setData
(
'text'
,
options
);
this
.
setData
(
'text'
,
options
);
}
else
{
}
else
{
...
@@ -271,22 +272,22 @@ var MinderNode = KityMinder.MinderNode = kity.createClass( "MinderNode", {
...
@@ -271,22 +272,22 @@ var MinderNode = KityMinder.MinderNode = kity.createClass( "MinderNode", {
this
.
children
=
[];
this
.
children
=
[];
},
},
isHighlight
:
function
(){
isHighlight
:
function
(){
return
this
.
get
Attr
(
'highlight'
)
return
this
.
get
TmpData
(
'highlight'
)
},
},
set
Attr
:
function
(
a
,
v
){
set
TmpData
:
function
(
a
,
v
){
var
me
=
this
;
var
me
=
this
;
if
(
utils
.
isObject
(
a
)){
if
(
utils
.
isObject
(
a
)){
utils
.
each
(
a
,
function
(
val
,
key
){
utils
.
each
(
a
,
function
(
val
,
key
){
me
.
set
Attr
(
key
,
val
)
me
.
set
TmpData
(
key
,
val
)
})
})
}
}
if
(
v
===
undefined
||
v
===
null
||
v
===
''
){
if
(
v
===
undefined
||
v
===
null
||
v
===
''
){
this
.
node
.
removeAttribute
(
a
)
;
delete
this
.
tmpData
[
a
]
;
}
else
{
}
else
{
this
.
node
.
setAttribute
(
a
,
v
)
;
this
.
tmpData
[
a
]
=
v
;
}
}
},
},
get
Attr
:
function
(
a
){
get
TmpData
:
function
(
a
){
return
this
.
node
.
getAttribute
(
a
)
return
this
.
tmpData
[
a
]
}
}
}
);
}
);
\ No newline at end of file
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