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
44f35fea
Commit
44f35fea
authored
Oct 12, 2014
by
techird
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release-1.3.0' of github.com:fex-team/kityminder into release-1.3.1
parents
92fd1f64
201b0f5e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
8 deletions
+25
-8
editor.js
src/module/editor.js
+7
-2
editor.keyboard.js
src/module/editor.keyboard.js
+12
-5
editor.range.js
src/module/editor.range.js
+6
-1
No files found.
src/module/editor.js
View file @
44f35fea
...
...
@@ -16,7 +16,7 @@ KityMinder.registerModule('TextEditModule', function() {
//当前是否有选区存在
var
selectionReadyShow
=
false
;
var
mousedownNode
,
mouseupTimer
;
var
mousedownNode
,
mouseupTimer
,
mousedownTimer
;
var
lastMinderNode
;
function
inputStatusReady
(
node
){
...
...
@@ -117,8 +117,13 @@ KityMinder.registerModule('TextEditModule', function() {
sel
.
setShowStatus
();
setTimeout
(
function
()
{
clearTimeout
(
mousedownTimer
);
mousedownTimer
=
setTimeout
(
function
()
{
if
(
dblclickEvent
){
dblclickEvent
=
false
;
return
;
}
sel
.
collapse
(
true
)
.
updatePosition
(
receiver
.
getOffsetByIndex
())
.
setShow
();
...
...
src/module/editor.keyboard.js
View file @
44f35fea
...
...
@@ -95,7 +95,7 @@ Minder.keyboarder = kity.createClass('keyboarder', function(){
me
.
inputTextTimer
=
setTimeout
(
function
(){
me
.
km
.
layout
(
300
);
},
25
0
);
},
30
0
);
}
me
.
re
.
updateTextOffsetData
()
...
...
@@ -104,8 +104,13 @@ Minder.keyboarder = kity.createClass('keyboarder', function(){
me
.
selection
.
updateOffsetByTextData
(
me
.
re
.
textData
)
.
updatePosition
()
.
setHoldShow
();
.
updatePosition
();
//当然inputready状态时,如果输入文字,节点内文本会被先选中然后再消失,体验不好
if
(
me
.
km
.
getStatus
()
!=
'inputready'
){
me
.
selection
.
setHoldShow
();
}
me
.
timer
=
setTimeout
(
function
()
{
...
...
@@ -230,7 +235,9 @@ Minder.keyboarder = kity.createClass('keyboarder', function(){
this
.
isShortcutCopyKey
=
false
;
//针对不能连续删除做处理
if
(
keymap
.
Del
==
keyCode
||
keymap
.
Backspace
==
keyCode
)
//if(keymap.Del == keyCode || keymap.Backspace == keyCode)
// me._setTextToContainer(keyCode);
me
.
_setTextToContainer
(
keyCode
);
},
_beforeKeyup
:
function
(
e
){
...
...
src/module/editor.range.js
View file @
44f35fea
...
...
@@ -7,7 +7,12 @@ Minder.Range = kity.createClass('Range',function(){
if
(
node
.
nodeType
==
1
){
//默认不会出现得不到子节点的情况
node
=
node
.
childNodes
[
offset
];
if
(
node
.
nodeType
==
3
){
if
(
!
node
&&
rng
.
startContainer
&&
rng
.
startContainer
.
nodeName
==
'DIV'
)
{
rng
.
startContainer
.
innerHTML
=
'<p></p>'
;
offset
=
0
;
}
else
if
(
node
.
nodeType
==
3
){
offset
=
0
;
}
}
...
...
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