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
fcd6b5aa
Commit
fcd6b5aa
authored
Feb 20, 2014
by
campaign
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
by zhanyi
parent
a501f441
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
minder.js
src/core/minder.js
+7
-0
editor.js
src/module/editor.js
+4
-2
No files found.
src/core/minder.js
View file @
fcd6b5aa
...
...
@@ -69,6 +69,9 @@ var Minder = KityMinder.Minder = kity.createClass( "KityMinder", {
this
.
_shortcutkeys
=
{};
this
.
_bindshortcutKeys
();
},
isTextEditStatus
:
function
(){
return
false
;
},
addShortcutKeys
:
function
(
cmd
,
keys
)
{
var
obj
=
{},
km
=
this
;
if
(
keys
)
{
...
...
@@ -122,6 +125,10 @@ var Minder = KityMinder.Minder = kity.createClass( "KityMinder", {
current
++
;
}
});
//todo 暂时通过receiver判断
if
(
me
.
isTextEditStatus
()){
return
;
}
if
(
current
==
keys
.
length
){
if
(
me
.
queryCommandState
(
i
)
!=
-
1
)
me
.
execCommand
(
i
);
...
...
src/module/editor.js
View file @
fcd6b5aa
...
...
@@ -12,7 +12,9 @@ KityMinder.registerModule( "TextEditModule", function () {
var
lastEvtPosition
,
dir
=
1
;
km
.
isTextEditStatus
=
function
(){
return
km
.
receiver
.
isTextEditStatus
();
}
return
{
//插入光标
...
...
@@ -27,7 +29,7 @@ KityMinder.registerModule( "TextEditModule", function () {
var
textShape
=
node
.
getTextShape
();
textShape
.
setStyle
(
'cursor'
,
'default'
);
if
(
this
.
isSingleSelect
()
&&
node
.
isSelected
()
&&
e
.
kityEvent
.
targetShape
.
getType
().
toLowerCase
()
==
'text'
)
{
if
(
this
.
isSingleSelect
()
&&
node
.
isSelected
()
)
{
// && e.kityEvent.targetShape.getType().toLowerCase()== 'text'
sel
.
collapse
();
node
.
getTextShape
().
setStyle
(
'cursor'
,
'text'
);
...
...
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