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
40f51378
Commit
40f51378
authored
Jul 10, 2015
by
张博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modified the protocols dataType and add getRegisterProtocol function
parent
2506f95b
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
26 additions
and
13 deletions
+26
-13
bower.json
bower.json
+1
-1
kityminder.core.js
dist/kityminder.core.js
+10
-4
kityminder.core.min.js
dist/kityminder.core.min.js
+4
-4
data.js
src/core/data.js
+7
-0
json.js
src/protocol/json.js
+1
-1
markdown.js
src/protocol/markdown.js
+1
-1
png.js
src/protocol/png.js
+1
-1
svg.js
src/protocol/svg.js
+1
-1
No files found.
bower.json
View file @
40f51378
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
"name"
:
"kityminder-core"
,
"name"
:
"kityminder-core"
,
"title"
:
"Kity Minder Core"
,
"title"
:
"Kity Minder Core"
,
"description"
:
"Powerful online mind graphic visualization and editor (command based)"
,
"description"
:
"Powerful online mind graphic visualization and editor (command based)"
,
"version"
:
"1.4.
9
"
,
"version"
:
"1.4.
10
"
,
"main"
:
[
"main"
:
[
"release/kityminder.core.min.js"
,
"release/kityminder.core.min.js"
,
"release/kityminder.core.css"
"release/kityminder.core.css"
...
...
dist/kityminder.core.js
View file @
40f51378
...
@@ -690,6 +690,12 @@ _p[11] = {
...
@@ -690,6 +690,12 @@ _p[11] = {
var
protocols
=
{};
var
protocols
=
{};
function
registerProtocol
(
name
,
protocol
)
{
function
registerProtocol
(
name
,
protocol
)
{
protocols
[
name
]
=
protocol
;
protocols
[
name
]
=
protocol
;
for
(
var
pname
in
protocols
)
{
if
(
protocols
.
hasOwnProperty
(
pname
))
{
protocols
[
pname
]
=
protocols
[
pname
];
protocols
[
pname
].
name
=
pname
;
}
}
}
}
function
getRegisterProtocol
(
name
)
{
function
getRegisterProtocol
(
name
)
{
return
name
===
undefined
?
protocols
:
protocols
[
name
]
||
null
;
return
name
===
undefined
?
protocols
:
protocols
[
name
]
||
null
;
...
@@ -7202,7 +7208,7 @@ _p[61] = {
...
@@ -7202,7 +7208,7 @@ _p[61] = {
data
.
registerProtocol
(
"json"
,
module
.
exports
=
{
data
.
registerProtocol
(
"json"
,
module
.
exports
=
{
fileDescription
:
"KityMinder 格式"
,
fileDescription
:
"KityMinder 格式"
,
fileExtension
:
".km"
,
fileExtension
:
".km"
,
dataType
:
"
json
"
,
dataType
:
"
text
"
,
mineType
:
"application/json"
,
mineType
:
"application/json"
,
encode
:
function
(
json
)
{
encode
:
function
(
json
)
{
return
JSON
.
stringify
(
json
);
return
JSON
.
stringify
(
json
);
...
@@ -7334,7 +7340,7 @@ _p[62] = {
...
@@ -7334,7 +7340,7 @@ _p[62] = {
fileDescription
:
"Markdown/GFM 格式"
,
fileDescription
:
"Markdown/GFM 格式"
,
fileExtension
:
".md"
,
fileExtension
:
".md"
,
mineType
:
"text/markdown"
,
mineType
:
"text/markdown"
,
dataType
:
"
markdown
"
,
dataType
:
"
text
"
,
encode
:
function
(
json
)
{
encode
:
function
(
json
)
{
return
encode
(
json
.
root
);
return
encode
(
json
.
root
);
},
},
...
@@ -7453,7 +7459,7 @@ _p[63] = {
...
@@ -7453,7 +7459,7 @@ _p[63] = {
fileDescription
:
"PNG 图片"
,
fileDescription
:
"PNG 图片"
,
fileExtension
:
".png"
,
fileExtension
:
".png"
,
mineType
:
"image/png"
,
mineType
:
"image/png"
,
dataType
:
"
png
"
,
dataType
:
"
base64
"
,
encode
:
encode
encode
:
encode
});
});
}
}
...
@@ -7467,7 +7473,7 @@ _p[64] = {
...
@@ -7467,7 +7473,7 @@ _p[64] = {
fileDescription
:
"SVG 矢量图"
,
fileDescription
:
"SVG 矢量图"
,
fileExtension
:
".svg"
,
fileExtension
:
".svg"
,
mineType
:
"image/svg+xml"
,
mineType
:
"image/svg+xml"
,
dataType
:
"
svg
"
,
dataType
:
"
text
"
,
encode
:
function
(
json
,
minder
)
{
encode
:
function
(
json
,
minder
)
{
var
paper
=
minder
.
getPaper
(),
paperTransform
=
paper
.
shapeNode
.
getAttribute
(
"transform"
),
svgXml
,
svgContainer
,
svgDom
,
renderContainer
=
minder
.
getRenderContainer
(),
renderBox
=
renderContainer
.
getRenderBox
(),
transform
=
renderContainer
.
getTransform
(),
width
=
renderBox
.
width
,
height
=
renderBox
.
height
,
padding
=
20
;
var
paper
=
minder
.
getPaper
(),
paperTransform
=
paper
.
shapeNode
.
getAttribute
(
"transform"
),
svgXml
,
svgContainer
,
svgDom
,
renderContainer
=
minder
.
getRenderContainer
(),
renderBox
=
renderContainer
.
getRenderBox
(),
transform
=
renderContainer
.
getTransform
(),
width
=
renderBox
.
width
,
height
=
renderBox
.
height
,
padding
=
20
;
paper
.
shapeNode
.
setAttribute
(
"transform"
,
"translate(0.5, 0.5)"
);
paper
.
shapeNode
.
setAttribute
(
"transform"
,
"translate(0.5, 0.5)"
);
...
...
dist/kityminder.core.min.js
View file @
40f51378
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/core/data.js
View file @
40f51378
...
@@ -11,6 +11,13 @@ define(function(require, exports, module) {
...
@@ -11,6 +11,13 @@ define(function(require, exports, module) {
function
registerProtocol
(
name
,
protocol
)
{
function
registerProtocol
(
name
,
protocol
)
{
protocols
[
name
]
=
protocol
;
protocols
[
name
]
=
protocol
;
for
(
var
pname
in
protocols
)
{
if
(
protocols
.
hasOwnProperty
(
pname
))
{
protocols
[
pname
]
=
protocols
[
pname
];
protocols
[
pname
].
name
=
pname
;
}
}
}
}
function
getRegisterProtocol
(
name
)
{
function
getRegisterProtocol
(
name
)
{
...
...
src/protocol/json.js
View file @
40f51378
...
@@ -4,7 +4,7 @@ define(function(require, exports, module) {
...
@@ -4,7 +4,7 @@ define(function(require, exports, module) {
data
.
registerProtocol
(
'json'
,
module
.
exports
=
{
data
.
registerProtocol
(
'json'
,
module
.
exports
=
{
fileDescription
:
'KityMinder 格式'
,
fileDescription
:
'KityMinder 格式'
,
fileExtension
:
'.km'
,
fileExtension
:
'.km'
,
dataType
:
'
json
'
,
dataType
:
'
text
'
,
mineType
:
'application/json'
,
mineType
:
'application/json'
,
encode
:
function
(
json
)
{
encode
:
function
(
json
)
{
...
...
src/protocol/markdown.js
View file @
40f51378
...
@@ -145,7 +145,7 @@ define(function(require, exports, module) {
...
@@ -145,7 +145,7 @@ define(function(require, exports, module) {
fileDescription
:
'Markdown/GFM 格式'
,
fileDescription
:
'Markdown/GFM 格式'
,
fileExtension
:
'.md'
,
fileExtension
:
'.md'
,
mineType
:
'text/markdown'
,
mineType
:
'text/markdown'
,
dataType
:
'
markdown
'
,
dataType
:
'
text
'
,
encode
:
function
(
json
)
{
encode
:
function
(
json
)
{
return
encode
(
json
.
root
);
return
encode
(
json
.
root
);
...
...
src/protocol/png.js
View file @
40f51378
...
@@ -146,7 +146,7 @@ define(function(require, exports, module) {
...
@@ -146,7 +146,7 @@ define(function(require, exports, module) {
fileDescription
:
'PNG 图片'
,
fileDescription
:
'PNG 图片'
,
fileExtension
:
'.png'
,
fileExtension
:
'.png'
,
mineType
:
'image/png'
,
mineType
:
'image/png'
,
dataType
:
'
png
'
,
dataType
:
'
base64
'
,
encode
:
encode
encode
:
encode
});
});
});
});
\ No newline at end of file
src/protocol/svg.js
View file @
40f51378
...
@@ -5,7 +5,7 @@ define(function(require, exports, module) {
...
@@ -5,7 +5,7 @@ define(function(require, exports, module) {
fileDescription
:
'SVG 矢量图'
,
fileDescription
:
'SVG 矢量图'
,
fileExtension
:
'.svg'
,
fileExtension
:
'.svg'
,
mineType
:
'image/svg+xml'
,
mineType
:
'image/svg+xml'
,
dataType
:
'
svg
'
,
dataType
:
'
text
'
,
encode
:
function
(
json
,
minder
)
{
encode
:
function
(
json
,
minder
)
{
...
...
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