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
5ee66b33
Commit
5ee66b33
authored
Jul 08, 2014
by
techird
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release-1.2.0' of github.com:fex-team/kityminder into release-1.2.0
parents
973140e3
a3b39ce9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
11 deletions
+26
-11
editor.js
src/module/editor.js
+15
-6
editor.receiver.js
src/module/editor.receiver.js
+11
-5
No files found.
src/module/editor.js
View file @
5ee66b33
...
...
@@ -261,9 +261,12 @@ KityMinder.registerModule('TextEditModule', function() {
}
receiver
.
clear
();
if
(
this
.
getStatus
()
==
'textedit'
)
{
this
.
setStatus
(
'normal'
);
// receiver.clear();
// if (this.getStatus() == 'textedit') {
// this.setStatus('normal');
// }
if
(
sel
.
isShow
()){
receiver
.
updateTextOffsetData
().
updateSelection
()
}
},
'layoutfinish'
:
function
(
e
){
...
...
@@ -271,12 +274,18 @@ KityMinder.registerModule('TextEditModule', function() {
receiver
.
setBaseOffset
()
.
setContainerStyle
();
}
},
'selectionclear'
:
function
()
{
km
.
setStatus
(
'normal'
);
receiver
.
clear
();
var
node
=
km
.
getSelectedNode
();
if
(
node
){
inputStatusReady
(
node
);
}
else
{
km
.
setStatus
(
'normal'
);
receiver
.
clear
();
}
},
'blur'
:
function
()
{
receiver
.
clear
();
...
...
src/module/editor.receiver.js
View file @
5ee66b33
...
...
@@ -20,7 +20,9 @@ Minder.Receiver = kity.createClass('Receiver', {
var
_div
=
document
.
createElement
(
'div'
);
_div
.
setAttribute
(
'contenteditable'
,
true
);
_div
.
className
=
'km_receiver'
;
this
.
container
=
_div
;
if
(
browser
.
ipad
)
{
utils
.
listen
(
this
.
container
,
'keydown keypress keyup input'
,
function
(
e
)
{
me
.
keyboardEvents
.
call
(
me
,
new
MinderEvent
(
e
.
type
==
'keyup'
?
'beforekeyup'
:
e
.
type
,
e
));
...
...
@@ -229,8 +231,8 @@ Minder.Receiver = kity.createClass('Receiver', {
case
keymap
.
Alt
:
case
keymap
.
Cmd
:
case
keymap
.
F2
:
case
keymap
.
Del
:
case
keymap
.
Backspace
:
//
case keymap.Del:
//
case keymap.Backspace:
if
(
this
.
selection
.
isHide
()){
this
.
km
.
setStatus
(
'normal'
);
}
...
...
@@ -323,9 +325,9 @@ Minder.Receiver = kity.createClass('Receiver', {
}
return
;
}
setTimeout
(
function
()
{
//针对不能连续删除做处理
if
(
keymap
.
Del
||
keymap
.
Backspace
)
setTextToContainer
(
keyCode
);
});
break
;
case
'beforekeyup'
:
...
...
@@ -370,9 +372,13 @@ Minder.Receiver = kity.createClass('Receiver', {
}
if
(
this
.
isTypeText
)
{
setTextToContainer
(
keyCode
);
return
;
}
if
(
browser
.
mac
&&
browser
.
gecko
)
if
(
browser
.
mac
&&
browser
.
gecko
)
{
setTextToContainer
(
keyCode
);
return
;
}
setTextToContainer
(
keyCode
);
return
true
;
}
...
...
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