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
f0cb4ee8
Commit
f0cb4ee8
authored
May 09, 2014
by
Akikonata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
grunt
parent
181512d2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
28 deletions
+37
-28
index.html
dist/index.html
+11
-11
kityminder.all.js
dist/kityminder.all.js
+22
-13
kityminder.all.min.js
dist/kityminder.all.min.js
+3
-3
kity
kity
+1
-1
No files found.
dist/index.html
View file @
f0cb4ee8
...
@@ -7,26 +7,26 @@
...
@@ -7,26 +7,26 @@
<meta
name=
"description"
content=
"百度脑图,便捷的脑图编辑工具。让您在线上直接创建、保存并分享你的思路。"
>
<meta
name=
"description"
content=
"百度脑图,便捷的脑图编辑工具。让您在线上直接创建、保存并分享你的思路。"
>
<script
src=
"lib/jquery-2.1.0.min.js?_=139962
4214062
"
charset=
"utf-8"
></script>
<script
src=
"lib/jquery-2.1.0.min.js?_=139962
7592968
"
charset=
"utf-8"
></script>
<script
src=
"lib/ZeroClipboard.min.js?_=139962
4214062
"
charset=
"utf-8"
></script>
<script
src=
"lib/ZeroClipboard.min.js?_=139962
7592968
"
charset=
"utf-8"
></script>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
ZeroClipboard
.
setDefaults
(
{
moviePath
:
'lib/ZeroClipboard.swf'
}
);
ZeroClipboard
.
setDefaults
(
{
moviePath
:
'lib/ZeroClipboard.swf'
}
);
</script>
</script>
<script
src=
"lib/kitygraph.all.min.js?_=139962
4214062
"
charset=
"utf-8"
></script>
<script
src=
"lib/kitygraph.all.min.js?_=139962
7592968
"
charset=
"utf-8"
></script>
<script
src=
"kityminder.all.min.js?_=139962
4214062
"
charset=
"utf-8"
></script>
<script
src=
"kityminder.all.min.js?_=139962
7592968
"
charset=
"utf-8"
></script>
<script
src=
"kityminder.config.js?_=139962
4214062
"
charset=
"utf-8"
></script>
<script
src=
"kityminder.config.js?_=139962
7592968
"
charset=
"utf-8"
></script>
<script
src=
"lang/zh-cn/zh-cn.js?_=139962
4214062
"
charset=
"utf-8"
></script>
<script
src=
"lang/zh-cn/zh-cn.js?_=139962
7592968
"
charset=
"utf-8"
></script>
<script
src=
"lib/zip.js?_=139962
4214062
"
charset=
"utf-8"
></script>
<script
src=
"lib/zip.js?_=139962
7592968
"
charset=
"utf-8"
></script>
<script>
<script>
zip
.
inflateJSPath
=
'lib/inflate.js'
;
zip
.
inflateJSPath
=
'lib/inflate.js'
;
</script>
</script>
<script
src=
"lib/jquery.xml2json.js?_=139962
4214062
"
charset=
"utf-8"
></script>
<script
src=
"lib/jquery.xml2json.js?_=139962
7592968
"
charset=
"utf-8"
></script>
<script
src=
"lib/baidu-frontia-js-full-1.0.0.js?_=139962
4214062
"
charset=
"utf-8"
></script>
<script
src=
"lib/baidu-frontia-js-full-1.0.0.js?_=139962
7592968
"
charset=
"utf-8"
></script>
<script
src=
"social/draftmanager.js?_=139962
4214062
"
charset=
"utf-8"
></script>
<script
src=
"social/draftmanager.js?_=139962
7592968
"
charset=
"utf-8"
></script>
<script
src=
"social/social.js?_=139962
4214062
"
charset=
"utf-8"
></script>
<script
src=
"social/social.js?_=139962
7592968
"
charset=
"utf-8"
></script>
<link
href=
"social/social.css"
rel=
"stylesheet"
>
<link
href=
"social/social.css"
rel=
"stylesheet"
>
<link
href=
"themes/default/css/import.css"
type=
"text/css"
rel=
"stylesheet"
/>
<link
href=
"themes/default/css/import.css"
type=
"text/css"
rel=
"stylesheet"
/>
...
...
dist/kityminder.all.js
View file @
f0cb4ee8
...
@@ -291,9 +291,9 @@ var utils = Utils = KityMinder.Utils = {
...
@@ -291,9 +291,9 @@ var utils = Utils = KityMinder.Utils = {
element
.
onload
=
element
.
onreadystatechange
=
null
;
element
.
onload
=
element
.
onreadystatechange
=
null
;
}
}
};
};
element
.
onerror
=
function
()
{
//
element.onerror = function () {
throw
Error
(
'The load '
+
(
obj
.
href
||
obj
.
src
)
+
' fails,check the url settings of file '
)
//
throw Error('The load ' + (obj.href || obj.src) + ' fails,check the url settings of file ')
};
//
};
doc
.
getElementsByTagName
(
"head"
)[
0
].
appendChild
(
element
);
doc
.
getElementsByTagName
(
"head"
)[
0
].
appendChild
(
element
);
}
}
}(),
}(),
...
@@ -5336,7 +5336,12 @@ Minder.Range = kity.createClass('Range',{
...
@@ -5336,7 +5336,12 @@ Minder.Range = kity.createClass('Range',{
this
.
nativeRange
.
setStart
(
char
,
1
);
this
.
nativeRange
.
setStart
(
char
,
1
);
this
.
nativeRange
.
collapse
(
true
);
this
.
nativeRange
.
collapse
(
true
);
}
}
this
.
nativeSel
.
removeAllRanges
();
try
{
this
.
nativeSel
.
removeAllRanges
();
}
catch
(
e
){
}
this
.
nativeSel
.
addRange
(
this
.
nativeRange
);
this
.
nativeSel
.
addRange
(
this
.
nativeRange
);
return
this
;
return
this
;
},
},
...
@@ -5344,7 +5349,7 @@ Minder.Range = kity.createClass('Range',{
...
@@ -5344,7 +5349,7 @@ Minder.Range = kity.createClass('Range',{
try
{
try
{
this
.
nativeRange
.
setStart
(
node
,
index
);
this
.
nativeRange
.
setStart
(
node
,
index
);
}
catch
(
e
){
}
catch
(
e
){
console
.
log
(
e
)
console
.
log
(
'e'
)
}
}
return
this
;
return
this
;
...
@@ -5394,12 +5399,18 @@ Minder.Receiver = kity.createClass( 'Receiver', {
...
@@ -5394,12 +5399,18 @@ Minder.Receiver = kity.createClass( 'Receiver', {
return
this
.
textEditStatus
;
return
this
.
textEditStatus
;
},
},
constructor
:
function
(
km
)
{
constructor
:
function
(
km
)
{
var
me
=
this
;
this
.
setKityMinder
(
km
);
this
.
setKityMinder
(
km
);
this
.
textEditStatus
=
false
;
this
.
textEditStatus
=
false
;
var
_div
=
document
.
createElement
(
'div'
);
var
_div
=
document
.
createElement
(
'div'
);
_div
.
setAttribute
(
'contenteditable'
,
true
);
_div
.
setAttribute
(
'contenteditable'
,
true
);
_div
.
className
=
'km_receiver'
;
_div
.
className
=
'km_receiver'
;
this
.
container
=
document
.
body
.
insertBefore
(
_div
,
document
.
body
.
firstChild
);
this
.
container
=
document
.
body
.
insertBefore
(
_div
,
document
.
body
.
firstChild
);
if
(
browser
.
ie
&&
browser
.
version
==
11
){
utils
.
listen
(
this
.
container
,
'keydown keypress keyup'
,
function
(
e
){
me
.
keyboardEvents
.
call
(
me
,
new
MinderEvent
(
e
.
type
==
'keyup'
?
"beforekeyup"
:
e
.
type
,
e
))
})
}
utils
.
addCssRule
(
'km_receiver_css'
,
' .km_receiver{position:absolute;padding:0;margin:0;word-wrap:break-word;clip:rect(1em 1em 1em 1em);}'
);
//
utils
.
addCssRule
(
'km_receiver_css'
,
' .km_receiver{position:absolute;padding:0;margin:0;word-wrap:break-word;clip:rect(1em 1em 1em 1em);}'
);
//
this
.
km
.
on
(
'textedit.beforekeyup textedit.keydown textedit.keypress textedit.paste'
,
utils
.
proxy
(
this
.
keyboardEvents
,
this
)
);
this
.
km
.
on
(
'textedit.beforekeyup textedit.keydown textedit.keypress textedit.paste'
,
utils
.
proxy
(
this
.
keyboardEvents
,
this
)
);
this
.
timer
=
null
;
this
.
timer
=
null
;
...
@@ -5492,6 +5503,7 @@ Minder.Receiver = kity.createClass( 'Receiver', {
...
@@ -5492,6 +5503,7 @@ Minder.Receiver = kity.createClass( 'Receiver', {
switch
(
e
.
type
)
{
switch
(
e
.
type
)
{
case
'keydown'
:
case
'keydown'
:
isTypeText
=
false
;
isTypeText
=
false
;
isKeypress
=
false
;
isKeypress
=
false
;
switch
(
e
.
originEvent
.
keyCode
)
{
switch
(
e
.
originEvent
.
keyCode
)
{
...
@@ -5540,6 +5552,7 @@ Minder.Receiver = kity.createClass( 'Receiver', {
...
@@ -5540,6 +5552,7 @@ Minder.Receiver = kity.createClass( 'Receiver', {
case
'keypress'
:
case
'keypress'
:
if
(
isTypeText
)
if
(
isTypeText
)
setTextToContainer
();
setTextToContainer
();
isKeypress
=
true
;
isKeypress
=
true
;
...
@@ -5547,7 +5560,6 @@ Minder.Receiver = kity.createClass( 'Receiver', {
...
@@ -5547,7 +5560,6 @@ Minder.Receiver = kity.createClass( 'Receiver', {
case
'beforekeyup'
:
case
'beforekeyup'
:
switch
(
keyCode
)
{
switch
(
keyCode
)
{
case
keymap
.
Enter
:
case
keymap
.
Enter
:
case
keymap
.
Tab
:
case
keymap
.
Tab
:
...
@@ -5619,18 +5631,15 @@ Minder.Receiver = kity.createClass( 'Receiver', {
...
@@ -5619,18 +5631,15 @@ Minder.Receiver = kity.createClass( 'Receiver', {
},
},
setContainerStyle
:
function
()
{
setContainerStyle
:
function
()
{
var
textShapeBox
=
this
.
getBaseOffset
(
'screen'
);
var
textShapeBox
=
this
.
getBaseOffset
(
'screen'
);
this
.
container
.
style
.
cssText
=
";left:"
+
textShapeBox
.
x
+
'px;top:'
+
(
textShapeBox
.
y
-
5
)
+
'px;width:'
+
textShapeBox
.
width
+
'px;height:'
+
textShapeBox
.
height
+
'px;'
;
this
.
container
.
style
.
cssText
=
";left:"
+
textShapeBox
.
x
+
'px;top:'
+
(
textShapeBox
.
y
-
3
5
)
+
'px;width:'
+
textShapeBox
.
width
+
'px;height:'
+
textShapeBox
.
height
+
'px;'
;
if
(
!
this
.
selection
.
isShow
()){
if
(
!
this
.
selection
.
isShow
()){
var
paperContainer
=
this
.
km
.
getPaper
();
var
paperContainer
=
this
.
km
.
getPaper
();
var
width
=
paperContainer
.
node
.
parentNode
.
clientWidth
;
var
width
=
paperContainer
.
node
.
parentNode
.
clientWidth
;
var
height
=
paperContainer
.
node
.
parentNode
.
clientHeight
;
var
height
=
paperContainer
.
node
.
parentNode
.
clientHeight
;
if
(
width
<
this
.
container
.
offsetWidth
+
this
.
container
.
offsetLeft
){
if
(
width
<
this
.
container
.
offsetWidth
+
this
.
container
.
offsetLeft
){
this
.
km
.
getRenderContainer
().
translate
(
width
/-
3
,
0
);
this
.
km
.
getRenderContainer
().
translate
(
width
/-
3
,
0
);
this
.
setContainerStyle
();
this
.
setContainerStyle
();
}
else
if
(
height
<
this
.
container
.
offsetTop
+
this
.
container
.
offsetHeight
){
}
else
if
(
height
<
this
.
container
.
offsetTop
+
this
.
container
.
offsetHeight
){
this
.
km
.
getRenderContainer
().
translate
(
0
,
height
/-
3
);
this
.
km
.
getRenderContainer
().
translate
(
0
,
height
/-
3
);
this
.
setContainerStyle
()
this
.
setContainerStyle
()
...
@@ -5718,7 +5727,7 @@ Minder.Receiver = kity.createClass( 'Receiver', {
...
@@ -5718,7 +5727,7 @@ Minder.Receiver = kity.createClass( 'Receiver', {
if
(
offset
.
x
<=
v
.
x
+
v
.
width
/
2
)
{
if
(
offset
.
x
<=
v
.
x
+
v
.
width
/
2
)
{
me
.
selection
.
collapse
()
me
.
selection
.
collapse
()
}
else
{
}
else
{
me
.
selection
.
setEndOffset
(
i
+
(
me
.
selection
.
endOffset
>
i
||
dir
==
1
?
1
:
0
)
)
me
.
selection
.
setEndOffset
(
i
+
(
(
me
.
selection
.
endOffset
>
i
||
dir
==
1
)
&&
i
!=
me
.
textData
.
length
-
1
?
1
:
0
)
)
}
}
}
else
if
(
i
>
me
.
index
)
{
}
else
if
(
i
>
me
.
index
)
{
...
@@ -5726,7 +5735,7 @@ Minder.Receiver = kity.createClass( 'Receiver', {
...
@@ -5726,7 +5735,7 @@ Minder.Receiver = kity.createClass( 'Receiver', {
me
.
selection
.
setEndOffset
(
i
+
1
)
me
.
selection
.
setEndOffset
(
i
+
1
)
}
else
{
}
else
{
if
(
dir
==
1
)
{
if
(
dir
==
1
)
{
me
.
selection
.
setStartOffset
(
i
+
(
offset
.
x
>=
v
.
x
+
v
.
width
/
2
&&
i
<
me
.
textData
.
length
-
1
?
1
:
0
)
);
me
.
selection
.
setStartOffset
(
i
+
(
offset
.
x
>=
v
.
x
+
v
.
width
/
2
&&
i
!=
me
.
textData
.
length
-
1
?
1
:
0
)
);
}
else
{
}
else
{
me
.
selection
.
setStartOffset
(
i
);
me
.
selection
.
setStartOffset
(
i
);
}
}
...
@@ -5752,7 +5761,7 @@ Minder.Receiver = kity.createClass( 'Receiver', {
...
@@ -5752,7 +5761,7 @@ Minder.Receiver = kity.createClass( 'Receiver', {
var
lastOffset
=
this
.
textData
[
this
.
textData
.
length
-
1
];
var
lastOffset
=
this
.
textData
[
this
.
textData
.
length
-
1
];
width
=
lastOffset
.
x
-
startOffset
.
x
+
lastOffset
.
width
;
width
=
lastOffset
.
x
-
startOffset
.
x
+
lastOffset
.
width
;
}
catch
(
e
){
}
catch
(
e
){
console
.
log
(
e
)
console
.
log
(
'e'
)
}
}
}
else
{
}
else
{
...
...
dist/kityminder.all.min.js
View file @
f0cb4ee8
This source diff could not be displayed because it is too large. You can
view the blob
instead.
kity
@
d4e00b31
Subproject commit
256dce28fb1e574b18f0dd084f7503cbc25e2a80
Subproject commit
d4e00b314db4116a92583114bcb67ff9a3c4d48d
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