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
7af2f5bd
Commit
7af2f5bd
authored
Feb 13, 2014
by
campaign
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
by zhanyi
parent
1a36d361
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
3 deletions
+9
-3
minder.select.js
src/core/minder.select.js
+1
-1
node.js
src/core/node.js
+7
-1
history.js
src/module/history.js
+1
-1
No files found.
src/core/minder.select.js
View file @
7af2f5bd
...
@@ -48,7 +48,7 @@ kity.extendClass( Minder, function () {
...
@@ -48,7 +48,7 @@ kity.extendClass( Minder, function () {
},
},
isNodeSelected
:
function
(
node
)
{
isNodeSelected
:
function
(
node
)
{
return
node
.
getData
(
'highlight'
)
===
true
;
return
node
.
get
Tmp
Data
(
'highlight'
)
===
true
;
},
},
//当前选区中的节点在给定的节点范围内的保留选中状态,没在给定范围的取消选中,给定范围中的但没在当前选中范围的也做选中效果
//当前选区中的节点在给定的节点范围内的保留选中状态,没在给定范围的取消选中,给定范围中的但没在当前选中范围的也做选中效果
toggleSelect
:
function
(
nodes
)
{
toggleSelect
:
function
(
nodes
)
{
...
...
src/core/node.js
View file @
7af2f5bd
...
@@ -231,6 +231,7 @@ var MinderNode = KityMinder.MinderNode = kity.createClass( "MinderNode", {
...
@@ -231,6 +231,7 @@ var MinderNode = KityMinder.MinderNode = kity.createClass( "MinderNode", {
var
_tmp
=
new
KM
.
MinderNode
(
isClonedNode
.
getText
()
);
var
_tmp
=
new
KM
.
MinderNode
(
isClonedNode
.
getText
()
);
_tmp
.
data
=
Utils
.
clonePlainObject
(
isClonedNode
.
getData
()
);
_tmp
.
data
=
Utils
.
clonePlainObject
(
isClonedNode
.
getData
()
);
_tmp
.
tmpData
=
Utils
.
clonePlainObject
(
isClonedNode
.
getTmpData
()
)
_tmp
.
parent
=
parent
;
_tmp
.
parent
=
parent
;
if
(
parent
)
{
if
(
parent
)
{
parent
.
children
.
push
(
_tmp
);
parent
.
children
.
push
(
_tmp
);
...
@@ -252,7 +253,9 @@ var MinderNode = KityMinder.MinderNode = kity.createClass( "MinderNode", {
...
@@ -252,7 +253,9 @@ var MinderNode = KityMinder.MinderNode = kity.createClass( "MinderNode", {
if
(
utils
.
compareObject
(
node
.
getData
(),
this
.
getData
()
)
===
false
)
{
if
(
utils
.
compareObject
(
node
.
getData
(),
this
.
getData
()
)
===
false
)
{
return
false
;
return
false
;
}
}
if
(
utils
.
compareObject
(
node
.
getTmpData
(),
this
.
getTmpData
()
)
===
false
)
{
return
false
;
}
for
(
var
i
=
0
,
ci
;
for
(
var
i
=
0
,
ci
;
(
ci
=
this
.
children
[
i
]
);
i
++
)
{
(
ci
=
this
.
children
[
i
]
);
i
++
)
{
if
(
ci
.
equals
(
node
.
children
[
i
]
)
===
false
)
{
if
(
ci
.
equals
(
node
.
children
[
i
]
)
===
false
)
{
...
@@ -288,6 +291,9 @@ var MinderNode = KityMinder.MinderNode = kity.createClass( "MinderNode", {
...
@@ -288,6 +291,9 @@ var MinderNode = KityMinder.MinderNode = kity.createClass( "MinderNode", {
}
}
},
},
getTmpData
:
function
(
a
){
getTmpData
:
function
(
a
){
if
(
a
===
undefined
)
{
return
this
.
tmpData
;
}
return
this
.
tmpData
[
a
]
return
this
.
tmpData
[
a
]
}
}
}
);
}
);
\ No newline at end of file
src/module/history.js
View file @
7af2f5bd
...
@@ -5,7 +5,6 @@ KityMinder.registerModule( "HistoryModule", function () {
...
@@ -5,7 +5,6 @@ KityMinder.registerModule( "HistoryModule", function () {
var
Scene
=
kity
.
createClass
(
'Scene'
,
{
var
Scene
=
kity
.
createClass
(
'Scene'
,
{
constructor
:
function
(
root
)
{
constructor
:
function
(
root
)
{
this
.
data
=
root
.
clone
();
this
.
data
=
root
.
clone
();
},
},
getData
:
function
()
{
getData
:
function
()
{
return
this
.
data
;
return
this
.
data
;
...
@@ -147,6 +146,7 @@ KityMinder.registerModule( "HistoryModule", function () {
...
@@ -147,6 +146,7 @@ KityMinder.registerModule( "HistoryModule", function () {
},
},
"renderNode"
:
function
(
e
){
"renderNode"
:
function
(
e
){
var
node
=
e
.
node
;
var
node
=
e
.
node
;
if
(
node
.
isHighlight
()){
if
(
node
.
isHighlight
()){
km
.
select
(
node
);
km
.
select
(
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