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
f1b00e74
Commit
f1b00e74
authored
Oct 09, 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.0
parents
e9877944
dbd4a13c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
editor.js
src/module/editor.js
+15
-2
No files found.
src/module/editor.js
View file @
f1b00e74
...
@@ -18,9 +18,11 @@ KityMinder.registerModule('TextEditModule', function() {
...
@@ -18,9 +18,11 @@ KityMinder.registerModule('TextEditModule', function() {
var
mousedownNode
,
mouseupTimer
;
var
mousedownNode
,
mouseupTimer
;
var
lastMinderNode
;
function
inputStatusReady
(
node
){
function
inputStatusReady
(
node
){
if
(
node
&&
km
.
isSingleSelect
()
&&
node
.
isSelected
())
{
if
(
node
&&
km
.
isSingleSelect
()
&&
node
.
isSelected
())
{
node
.
getTextGroup
().
setStyle
(
'cursor'
,
'default'
);
var
color
=
node
.
getStyle
(
'text-selection-color'
);
var
color
=
node
.
getStyle
(
'text-selection-color'
);
...
@@ -94,11 +96,13 @@ KityMinder.registerModule('TextEditModule', function() {
...
@@ -94,11 +96,13 @@ KityMinder.registerModule('TextEditModule', function() {
if
(
node
){
if
(
node
){
if
(
this
.
isSingleSelect
()
&&
node
.
isSelected
())
{
if
(
this
.
isSingleSelect
()
&&
node
.
isSelected
())
{
lastMinderNode
=
node
;
mousedownNode
=
node
;
mousedownNode
=
node
;
var
textGroup
=
node
.
getTextGroup
();
var
textGroup
=
node
.
getTextGroup
();
textGroup
.
setStyle
(
'cursor'
,
'default'
);
sel
.
collapse
(
true
);
sel
.
collapse
(
true
);
sel
.
setColor
(
node
.
getStyle
(
'text-selection-color'
));
sel
.
setColor
(
node
.
getStyle
(
'text-selection-color'
));
...
@@ -111,13 +115,15 @@ KityMinder.registerModule('TextEditModule', function() {
...
@@ -111,13 +115,15 @@ KityMinder.registerModule('TextEditModule', function() {
if
(
selectionReadyShow
){
if
(
selectionReadyShow
){
textGroup
.
setStyle
(
'cursor'
,
'text'
);
sel
.
setShowStatus
();
sel
.
setShowStatus
();
setTimeout
(
function
()
{
setTimeout
(
function
()
{
sel
.
collapse
(
true
)
sel
.
collapse
(
true
)
.
updatePosition
(
receiver
.
getOffsetByIndex
())
.
updatePosition
(
receiver
.
getOffsetByIndex
())
.
setShow
();
.
setShow
();
textGroup
.
setStyle
(
'cursor'
,
'text'
);
},
200
);
},
200
);
km
.
setStatus
(
'textedit'
);
km
.
setStatus
(
'textedit'
);
...
@@ -132,6 +138,12 @@ KityMinder.registerModule('TextEditModule', function() {
...
@@ -132,6 +138,12 @@ KityMinder.registerModule('TextEditModule', function() {
//当点击空白处时,光标需要消失
//当点击空白处时,光标需要消失
receiver
.
clear
();
receiver
.
clear
();
if
(
lastMinderNode
){
lastMinderNode
.
getTextGroup
().
setStyle
(
'cursor'
,
'default'
);
}
},
},
'inputready.keyup'
:
function
(){
'inputready.keyup'
:
function
(){
if
(
sel
.
isHide
()){
if
(
sel
.
isHide
()){
...
@@ -184,6 +196,7 @@ KityMinder.registerModule('TextEditModule', function() {
...
@@ -184,6 +196,7 @@ KityMinder.registerModule('TextEditModule', function() {
sel
.
collapse
(
true
)
sel
.
collapse
(
true
)
.
updatePosition
(
receiver
.
getOffsetByIndex
())
.
updatePosition
(
receiver
.
getOffsetByIndex
())
.
setShow
();
.
setShow
();
node
.
getTextGroup
().
setStyle
(
'cursor'
,
'text'
);
},
200
);
},
200
);
...
...
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