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
869129ba
Commit
869129ba
authored
Jul 01, 2014
by
campaign
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
texteditnode
parent
0b706bfa
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
31 deletions
+17
-31
editor.js
src/module/editor.js
+17
-31
No files found.
src/module/editor.js
View file @
869129ba
...
@@ -31,11 +31,16 @@ KityMinder.registerModule('TextEditModule', function() {
...
@@ -31,11 +31,16 @@ KityMinder.registerModule('TextEditModule', function() {
.
updateContainerRangeBySel
();
.
updateContainerRangeBySel
();
km
.
setStatus
(
'inputready'
);
km
.
setStatus
(
'inputready'
);
}
}
}
}
km
.
textEditNode
=
function
(
node
){
inputStatusReady
(
node
);
km
.
setStatus
(
'textedit'
);
receiver
.
updateSelectionShow
();
};
return
{
return
{
'events'
:
{
'events'
:
{
'ready'
:
function
()
{
'ready'
:
function
()
{
...
@@ -178,39 +183,20 @@ KityMinder.registerModule('TextEditModule', function() {
...
@@ -178,39 +183,20 @@ KityMinder.registerModule('TextEditModule', function() {
},
},
'normal.dblclick textedit.dblclick inputready.dblclick'
:
function
(
e
)
{
'normal.dblclick textedit.dblclick inputready.dblclick'
:
function
(
e
)
{
var
node
=
e
.
getTargetNode
();
if
(
node
){
inputStatusReady
(
e
.
getTargetNode
());
inputStatusReady
(
e
.
getTargetNode
());
km
.
setStatus
(
'textedit'
);
km
.
setStatus
(
'textedit'
);
receiver
.
updateSelectionShow
();
receiver
.
updateSelectionShow
();
}
},
'restoreScene'
:
function
()
{
receiver
.
clear
();
inputStatusReady
(
this
.
getSelectedNode
());
},
},
// 'restoreScene': function() {
// var node = this.getSelectedNode();
// if (node && this.isSingleSelect()) {
// var textShape = node.getRenderer('TextRenderer').getRenderShape();
// sel.setHide();
// sel.setStartOffset(0);
// sel.setEndOffset(textShape.getContent().length);
//
// receiver.setTextEditStatus(true)
// .setSelection(sel)
// .setKityMinder(this)
// .setMinderNode(node)
// .setTextShape(textShape)
// .setRange(range)
// .setBaseOffset()
// .setContainerStyle()
// .setSelectionHeight()
// .setContainerTxt(textShape.getContent())
// .updateRange(range).setTextEditStatus(true);
// km.setStatus('normal');
//
// sel.setData('relatedNode', node);
// } else {
// receiver.clear();
// }
//
// },
'stopTextEdit'
:
function
()
{
'stopTextEdit'
:
function
()
{
receiver
.
clear
();
receiver
.
clear
();
km
.
setStatus
(
'normal'
);
km
.
setStatus
(
'normal'
);
...
...
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