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
8d6d33e3
Commit
8d6d33e3
authored
Apr 03, 2014
by
Ronny
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修bug,没有选中节点按enter和tab键报错
parent
78b67651
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
editor.js
src/module/editor.js
+3
-0
layout.js
src/module/layout.js
+9
-1
No files found.
src/module/editor.js
View file @
8d6d33e3
...
...
@@ -142,6 +142,9 @@ KityMinder.registerModule( "TextEditModule", function () {
if
(
cmds
[
e
.
commandName
]){
var
node
=
km
.
getSelectedNode
();
if
(
!
node
){
return
;
}
var
textShape
=
node
.
getTextShape
();
...
...
src/module/layout.js
View file @
8d6d33e3
...
...
@@ -106,6 +106,11 @@ KityMinder.registerModule( "LayoutModule", function () {
base
:
Command
,
execute
:
function
(
km
,
node
,
focus
,
silbling
)
{
var
parent
=
km
.
getSelectedNode
();
if
(
!
parent
){
return
null
;
}
if
(
parent
.
getType
()
!==
"root"
&&
parent
.
getChildren
().
length
!==
0
&&
parent
.
getData
(
"expand"
)
===
false
)
{
km
.
expandNode
(
parent
);
}
...
...
@@ -129,7 +134,10 @@ KityMinder.registerModule( "LayoutModule", function () {
base
:
Command
,
execute
:
function
(
km
,
node
,
focus
)
{
var
selectedNode
=
km
.
getSelectedNode
();
if
(
!
selectedNode
){
return
null
;
}
if
(
selectedNode
.
isRoot
()
)
{
node
.
setType
(
"main"
);
km
.
appendChildNode
(
selectedNode
,
node
,
focus
);
...
...
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