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
715ca4ef
Commit
715ca4ef
authored
Apr 30, 2014
by
campaign
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
9639cc69
23a2a747
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
14 deletions
+25
-14
Gruntfile.js
Gruntfile.js
+5
-3
import.js
import.js
+2
-2
kity
kity
+1
-1
minder.data.js
src/core/minder.data.js
+17
-8
No files found.
Gruntfile.js
View file @
715ca4ef
...
...
@@ -20,7 +20,8 @@ module.exports = function ( grunt ) {
' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %>
\
n'
+
' * ====================================================
\
n'
+
' */
\
n
\
n'
,
buildPath
=
'dev/import.php'
,
buildPath
=
'import.js'
,
srcPath
=
'src/'
,
distPath
=
'dist/'
;
var
getPath
=
function
(
readFile
)
{
...
...
@@ -30,7 +31,7 @@ module.exports = function ( grunt ) {
sources
=
sources
[
1
].
replace
(
/
\/\/
.*
\n
/g
,
'
\
n'
).
replace
(
/'|"|
\n
|
\t
|
\s
/g
,
''
);
sources
=
sources
.
split
(
","
);
sources
.
forEach
(
function
(
filepath
,
index
)
{
sources
[
index
]
=
filepath
;
sources
[
index
]
=
srcPath
+
filepath
;
}
);
return
sources
;
...
...
@@ -63,7 +64,8 @@ module.exports = function ( grunt ) {
},
files
:
(
function
()
{
var
files
=
{};
files
[
distPath
+
'kityminder.all.js'
]
=
distPath
+
'kityminder.all.min.js'
;
files
[
distPath
+
'kityminder.all.min.js'
]
=
distPath
+
'kityminder.all.js'
;
console
.
log
(
files
);
return
files
;
}
)()
}
...
...
import.js
View file @
715ca4ef
...
...
@@ -2,7 +2,7 @@
* 开发版本的文件导入
*/
(
function
(){
var
paths
=
[
var
paths
=
new
Array
(
'core/kityminder.js'
,
'core/utils.js'
,
'core/command.js'
...
...
@@ -77,7 +77,7 @@
,
'protocal/json.js'
,
'protocal/png.js'
,
'protocal/svg.js'
]
,
)
,
baseURL
=
'src/'
;
for
(
var
i
=
0
,
pi
;
pi
=
paths
[
i
++
];)
{
document
.
write
(
'<script type="text/javascript" src="'
+
baseURL
+
pi
+
'"></script>'
);
...
...
kity
@
e144ccd9
Subproject commit
cb261f4cedd745233d9e022a72f76ddf8d8e129b
Subproject commit
e144ccd9270712497804915d13ec92f6593299b0
src/core/minder.data.js
View file @
715ca4ef
...
...
@@ -106,16 +106,22 @@ kity.extendClass( Minder, {
//*******************
function
ts
(
d
,
str
){
function
ts
(
d
,
str
,
last
){
var
h
=
d
.
getHours
(),
m
=
d
.
getMinutes
(),
s
=
d
.
getSeconds
(),
ms
=
d
.
getMilliseconds
();
console
.
log
(
'--- '
+
str
+
': '
+
(
h
+
':'
+
m
+
':'
+
s
+
' '
+
ms
)
+
' ---'
);
if
(
last
){
console
.
log
(
'--- '
+
str
+
': '
+
(
d
-
last
)
+
' ---'
);
}
else
{
console
.
log
(
'--- '
+
str
+
' ---'
);
}
return
d
;
}
var
start
=
ts
(
new
Date
(),
'开始解析'
);
var
t1
=
ts
(
new
Date
(),
'开始解析'
);
//*******************
json
=
params
.
json
||
(
params
.
json
=
protocal
.
decode
(
local
)
);
...
...
@@ -123,18 +129,21 @@ kity.extendClass( Minder, {
if
(
typeof
json
===
'object'
&&
'then'
in
json
)
{
var
self
=
this
;
json
.
then
(
local
,
function
(
data
)
{
//*******************
var
t2
=
ts
(
new
Date
(),
'解压解析耗时'
,
t1
);
//*******************
self
.
_afterImportData
(
data
,
params
);
//*******************
var
dur
=
ts
(
new
Date
(),
'解析和转化格式结束'
)
-
start
;
console
.
log
(
'--- 共'
+
dur
+
'ms ---'
);
ts
(
new
Date
(),
'渲染耗时'
,
t2
);
//*******************
}
);
}
else
{
//*******************
var
t2
=
ts
(
new
Date
(),
'解压解析耗时'
,
t1
);
//*******************
this
.
_afterImportData
(
json
,
params
);
//*******************
var
dur
=
ts
(
new
Date
(),
'解析和转化格式结束'
)
-
start
;
console
.
log
(
'--- 共'
+
dur
+
'ms ---'
);
ts
(
new
Date
(),
'渲染耗时'
,
t2
);
//*******************
}
return
this
;
...
...
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