Commit c1eaf6c8 authored by Akikonata's avatar Akikonata

added node

parent b56076a1
...@@ -89,7 +89,7 @@ KityMinder.registerModule( "LayoutModule", function () { ...@@ -89,7 +89,7 @@ KityMinder.registerModule( "LayoutModule", function () {
base: Command, base: Command,
execute: function ( km, node ) { execute: function ( km, node ) {
var parent = km.getSelectedNode(); var parent = km.getSelectedNode();
if ( parent.length === 0 ) { if ( !parent ) {
return false; return false;
} }
km.appendChildNode( parent, node ); km.appendChildNode( parent, node );
...@@ -103,7 +103,7 @@ KityMinder.registerModule( "LayoutModule", function () { ...@@ -103,7 +103,7 @@ KityMinder.registerModule( "LayoutModule", function () {
base: Command, base: Command,
execute: function ( km, node ) { execute: function ( km, node ) {
var selectedNode = km.getSelectedNode(); var selectedNode = km.getSelectedNode();
if ( selectedNode.length === 0 ) { if ( !selectedNode ) {
return false; return false;
} }
if ( selectedNode.isRoot() ) { if ( selectedNode.isRoot() ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment