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
a71e51d2
Commit
a71e51d2
authored
Jul 10, 2015
by
张博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use previous promise method and add getRegisterProtocol function
parent
419da45d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
8 deletions
+18
-8
kityminder.core.js
dist/kityminder.core.js
+6
-2
kityminder.core.min.js
dist/kityminder.core.min.js
+5
-5
data.js
src/core/data.js
+7
-1
No files found.
dist/kityminder.core.js
View file @
a71e51d2
/*!
* ====================================================
* kityminder - v1.4.1 - 2015-07-
09
* kityminder - v1.4.1 - 2015-07-
10
* https://github.com/fex-team/kityminder-core
* GitHub: https://github.com/fex-team/kityminder-core.git
* Copyright (c) 2015 Baidu FEX; Licensed MIT
...
...
@@ -691,7 +691,11 @@ _p[11] = {
function
registerProtocol
(
name
,
protocol
)
{
protocols
[
name
]
=
protocol
;
}
function
getRegisterProtocol
(
name
)
{
return
name
===
undefined
?
protocols
:
protocols
[
name
]
||
null
;
}
exports
.
registerProtocol
=
registerProtocol
;
exports
.
getRegisterProtocol
=
getRegisterProtocol
;
// 导入导出
kity
.
extendClass
(
Minder
,
{
// 自动导入
...
...
@@ -841,7 +845,7 @@ _p[11] = {
};
// 导入前抛事件
this
.
_fire
(
new
MinderEvent
(
"beforeimport"
,
params
));
return
protocol
.
decode
(
data
,
this
,
option
).
then
(
function
(
json
)
{
return
Promise
.
resolve
(
protocol
.
decode
(
data
,
this
,
option
)
).
then
(
function
(
json
)
{
minder
.
importJson
(
json
);
return
json
;
});
...
...
dist/kityminder.core.min.js
View file @
a71e51d2
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/core/data.js
View file @
a71e51d2
...
...
@@ -12,7 +12,13 @@ define(function(require, exports, module) {
function
registerProtocol
(
name
,
protocol
)
{
protocols
[
name
]
=
protocol
;
}
function
getRegisterProtocol
(
name
)
{
return
name
===
undefined
?
protocols
:
(
protocols
[
name
]
||
null
);
}
exports
.
registerProtocol
=
registerProtocol
;
exports
.
getRegisterProtocol
=
getRegisterProtocol
;
// 导入导出
kity
.
extendClass
(
Minder
,
{
...
...
@@ -194,7 +200,7 @@ define(function(require, exports, module) {
// 导入前抛事件
this
.
_fire
(
new
MinderEvent
(
'beforeimport'
,
params
));
return
protocol
.
decode
(
data
,
this
,
option
).
then
(
function
(
json
)
{
return
Promise
.
resolve
(
protocol
.
decode
(
data
,
this
,
option
)
).
then
(
function
(
json
)
{
minder
.
importJson
(
json
);
return
json
;
});
...
...
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