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
b3cf2e7a
Commit
b3cf2e7a
authored
Jul 07, 2014
by
campaign
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复shift+方向键的问题
parent
e00b53eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
editor.receiver.js
src/module/editor.receiver.js
+6
-0
No files found.
src/module/editor.receiver.js
View file @
b3cf2e7a
...
@@ -161,7 +161,9 @@ Minder.Receiver = kity.createClass('Receiver', {
...
@@ -161,7 +161,9 @@ Minder.Receiver = kity.createClass('Receiver', {
break
;
break
;
case
'beforekeydown'
:
case
'beforekeydown'
:
console
.
log
(
'AA'
)
this
.
isTypeText
=
keyCode
==
229
||
keyCode
===
0
;
this
.
isTypeText
=
keyCode
==
229
||
keyCode
===
0
;
switch
(
keyCode
)
{
switch
(
keyCode
)
{
case
keymap
.
Enter
:
case
keymap
.
Enter
:
case
keymap
.
Tab
:
case
keymap
.
Tab
:
...
@@ -198,6 +200,7 @@ Minder.Receiver = kity.createClass('Receiver', {
...
@@ -198,6 +200,7 @@ Minder.Receiver = kity.createClass('Receiver', {
}
}
//针对按住shift+方向键进行处理
//针对按住shift+方向键进行处理
if
(
orgEvt
.
shiftKey
&&
keymap
.
direction
[
keyCode
]
&&
this
.
selection
.
isShow
()){
if
(
orgEvt
.
shiftKey
&&
keymap
.
direction
[
keyCode
]
&&
this
.
selection
.
isShow
()){
if
(
this
.
selection
.
baseOffset
===
null
){
if
(
this
.
selection
.
baseOffset
===
null
){
this
.
selection
.
baseOffset
=
this
.
selection
.
startOffset
;
this
.
selection
.
baseOffset
=
this
.
selection
.
startOffset
;
...
@@ -238,6 +241,9 @@ Minder.Receiver = kity.createClass('Receiver', {
...
@@ -238,6 +241,9 @@ Minder.Receiver = kity.createClass('Receiver', {
this
.
updateSelectionShow
();
this
.
updateSelectionShow
();
e
.
preventDefault
();
e
.
preventDefault
();
return
;
return
;
}
else
if
(
keymap
.
direction
[
keyCode
]){
this
.
selection
.
baseOffset
=
this
.
selection
.
currentEndOffset
=
null
;
}
}
if
(
e
.
originEvent
.
ctrlKey
||
e
.
originEvent
.
metaKey
)
{
if
(
e
.
originEvent
.
ctrlKey
||
e
.
originEvent
.
metaKey
)
{
...
...
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