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
6475e1bc
Commit
6475e1bc
authored
Feb 14, 2014
by
campaign
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
by zhanyi
parent
22de9999
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
editor.receiver.js
src/module/editor.receiver.js
+8
-7
No files found.
src/module/editor.receiver.js
View file @
6475e1bc
...
@@ -231,17 +231,18 @@ Minder.Receiver = kity.createClass('Receiver',{
...
@@ -231,17 +231,18 @@ Minder.Receiver = kity.createClass('Receiver',{
var
currentIndex
=
this
.
getIndexByMousePosition
(
offset
,
dir
);
var
currentIndex
=
this
.
getIndexByMousePosition
(
offset
,
dir
);
if
(
currentIndex
==
0
||
currentIndex
==
this
.
textData
.
length
){
if
(
currentIndex
==
0
){
this
.
selection
.
setEndOffset
(
currentIndex
);
this
.
selection
.
setStartOffset
(
0
)
}
else
if
(
currentIndex
==
this
.
textData
.
length
){
this
.
selection
.
setEndOffset
(
currentIndex
)
}
else
{
}
else
{
if
(
dir
==
-
1
&&
currentIndex
<
this
.
selection
.
startOffset
){
if
(
currentIndex
>
this
.
index
){
this
.
selection
.
setEndOffset
(
currentIndex
)
}
else
if
(
currentIndex
<
this
.
index
){
this
.
selection
.
setStartOffset
(
currentIndex
)
this
.
selection
.
setStartOffset
(
currentIndex
)
}
else
{
}
else
{
this
.
selection
.
setEndOffset
(
currentIndex
);
this
.
selection
.
collapse
()
}
}
console
.
log
(
this
.
selection
.
startOffset
+
':'
+
this
.
selection
.
endOffset
)
console
.
log
(
this
.
selection
.
isCollapsed
)
}
}
...
...
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