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
547223aa
Commit
547223aa
authored
Apr 09, 2014
by
Ronny
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mindmanager新建节点默认不带text,直接传空字符串
parent
3981e134
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
minder.data.js
src/core/minder.data.js
+4
-3
mindmanager.js
src/protocal/mindmanager.js
+1
-1
No files found.
src/core/minder.data.js
View file @
547223aa
...
...
@@ -32,7 +32,8 @@ function exportNode( node ) {
var
DEFAULT_TEXT
=
{
'root'
:
'maintopic'
,
'main'
:
'topic'
'main'
:
'topic'
,
'sub'
:
'topic'
};
function
importNode
(
node
,
json
,
km
)
{
...
...
@@ -40,14 +41,14 @@ function importNode( node, json, km ) {
for
(
var
field
in
data
)
{
node
.
setData
(
field
,
data
[
field
]
);
}
node
.
setText
(
data
.
text
||
km
.
getLang
(
DEFAULT_TEXT
[
data
.
type
]
)
);
node
.
setText
(
data
.
text
||
km
.
getLang
(
DEFAULT_TEXT
[
node
.
getType
()
]
)
);
var
childrenTreeData
=
json
.
children
;
if
(
!
childrenTreeData
)
return
;
for
(
var
i
=
0
;
i
<
childrenTreeData
.
length
;
i
++
)
{
var
childNode
=
new
MinderNode
();
importNode
(
childNode
,
childrenTreeData
[
i
],
km
);
node
.
appendChild
(
childNode
);
importNode
(
childNode
,
childrenTreeData
[
i
],
km
);
}
return
node
;
}
...
...
src/protocal/mindmanager.js
View file @
547223aa
...
...
@@ -25,7 +25,7 @@ KityMinder.registerProtocal( 'mindmanager', function () {
function
processTopic
(
topic
,
obj
){
//处理文本
obj
.
data
=
{
text
:
topic
.
Text
&&
topic
.
Text
.
PlainText
||
'
_
'
};
// 节点默认的文本,没有Text属性
obj
.
data
=
{
text
:
topic
.
Text
&&
topic
.
Text
.
PlainText
||
''
};
// 节点默认的文本,没有Text属性
// 处理标签
if
(
topic
.
Task
){
...
...
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