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
c47acb5e
Commit
c47acb5e
authored
Apr 09, 2014
by
techird
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
publish
parent
a6733d5a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
11 deletions
+13
-11
kityminder.all.js
dist/kityminder.all.js
+10
-8
kityminder.all.min.js
dist/kityminder.all.min.js
+3
-3
No files found.
dist/kityminder.all.js
View file @
c47acb5e
/*!
/*!
* ====================================================
* ====================================================
* kityminder - v1.0.0 - 2014-04-0
8
* kityminder - v1.0.0 - 2014-04-0
9
* https://github.com/fex-team/kityminder
* https://github.com/fex-team/kityminder
* GitHub: https://github.com/fex-team/kityminder.git
* GitHub: https://github.com/fex-team/kityminder.git
* Copyright (c) 2014 f-cube @ FEX; Licensed MIT
* Copyright (c) 2014 f-cube @ FEX; Licensed MIT
...
@@ -993,7 +993,8 @@ function exportNode( node ) {
...
@@ -993,7 +993,8 @@ function exportNode( node ) {
var
DEFAULT_TEXT
=
{
var
DEFAULT_TEXT
=
{
'root'
:
'maintopic'
,
'root'
:
'maintopic'
,
'main'
:
'topic'
'main'
:
'topic'
,
'sub'
:
'topic'
};
};
function
importNode
(
node
,
json
,
km
)
{
function
importNode
(
node
,
json
,
km
)
{
...
@@ -1001,14 +1002,14 @@ function importNode( node, json, km ) {
...
@@ -1001,14 +1002,14 @@ function importNode( node, json, km ) {
for
(
var
field
in
data
)
{
for
(
var
field
in
data
)
{
node
.
setData
(
field
,
data
[
field
]
);
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
;
var
childrenTreeData
=
json
.
children
;
if
(
!
childrenTreeData
)
return
;
if
(
!
childrenTreeData
)
return
;
for
(
var
i
=
0
;
i
<
childrenTreeData
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
childrenTreeData
.
length
;
i
++
)
{
var
childNode
=
new
MinderNode
();
var
childNode
=
new
MinderNode
();
importNode
(
childNode
,
childrenTreeData
[
i
],
km
);
node
.
appendChild
(
childNode
);
node
.
appendChild
(
childNode
);
importNode
(
childNode
,
childrenTreeData
[
i
],
km
);
}
}
return
node
;
return
node
;
}
}
...
@@ -7914,7 +7915,7 @@ KityMinder.registerProtocal( 'mindmanager', function () {
...
@@ -7914,7 +7915,7 @@ KityMinder.registerProtocal( 'mindmanager', function () {
function
processTopic
(
topic
,
obj
){
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
){
if
(
topic
.
Task
){
...
@@ -8154,11 +8155,9 @@ KityMinder.registerProtocal( "png", function () {
...
@@ -8154,11 +8155,9 @@ KityMinder.registerProtocal( "png", function () {
renderContainer
.
translate
(
-
renderBox
.
x
,
-
renderBox
.
y
);
renderContainer
.
translate
(
-
renderBox
.
x
,
-
renderBox
.
y
);
svgXml
=
km
.
getPaper
().
container
.
innerHTML
;
svgXml
=
km
.
getPaper
().
container
.
innerHTML
;
// svg 含有 符号导出报错 Entity 'nbsp' not defined
svgXml
=
svgXml
.
replace
(
/ /g
,
' '
).
replace
(
/
\s
+/g
,
' '
);
renderContainer
.
translate
(
renderBox
.
x
,
renderBox
.
y
);
renderContainer
.
translate
(
renderBox
.
x
,
renderBox
.
y
);
$svg
=
$
(
svgXml
);
$svg
=
$
(
svgXml
);
$svg
.
attr
(
{
$svg
.
attr
(
{
width
:
renderBox
.
width
,
width
:
renderBox
.
width
,
...
@@ -8169,6 +8168,9 @@ KityMinder.registerProtocal( "png", function () {
...
@@ -8169,6 +8168,9 @@ KityMinder.registerProtocal( "png", function () {
// need a xml with width and height
// need a xml with width and height
svgXml
=
$
(
'<div></div'
).
append
(
$svg
).
html
();
svgXml
=
$
(
'<div></div'
).
append
(
$svg
).
html
();
// svg 含有 符号导出报错 Entity 'nbsp' not defined
svgXml
=
svgXml
.
replace
(
/ /g
,
' '
);
blob
=
new
Blob
(
[
svgXml
],
{
blob
=
new
Blob
(
[
svgXml
],
{
type
:
"image/svg+xml;charset=utf-8"
type
:
"image/svg+xml;charset=utf-8"
}
);
}
);
...
...
dist/kityminder.all.min.js
View file @
c47acb5e
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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