Commit 99208ad2 authored by techird's avatar techird

Merge branch 'gh-pages' of github.com:fex-team/kityminder into gh-pages

parents 8b4bfb8e 1e01e5b4
/*! /*!
* ==================================================== * ====================================================
* kityminder - v1.0.0 - 2014-03-17 * kityminder - v1.0.0 - 2014-03-18
* https://github.com/fex-team/kityminder * https://github.com/fex-team/kityminder
* GitHub: https://github.com/fex-team/kityminder.git * GitHub: https://github.com/fex-team/kityminder.git
* Copyright (c) 2014 f-cube @ FEX; Licensed MIT * Copyright (c) 2014 f-cube @ FEX; Licensed MIT
...@@ -2714,6 +2714,11 @@ KityMinder.registerModule( "LayoutDefault", function () { ...@@ -2714,6 +2714,11 @@ KityMinder.registerModule( "LayoutDefault", function () {
sideList.splice( index, 1 ); sideList.splice( index, 1 );
} }
parent.removeChild( nodes[ 0 ] ); parent.removeChild( nodes[ 0 ] );
if ( parent.getType() !== "root" && parent.getChildren().length === 0 ) {
var prtLayout = parent.getLayout();
prtLayout.shicon.remove();
prtLayout.shicon = null;
}
var set = updateLayoutVertical( nodes[ 0 ], parent, "remove" ); var set = updateLayoutVertical( nodes[ 0 ], parent, "remove" );
for ( var j = 0; j < set.length; j++ ) { for ( var j = 0; j < set.length; j++ ) {
translateNode( set[ j ] ); translateNode( set[ j ] );
...@@ -2965,7 +2970,7 @@ KityMinder.registerModule( "LayoutBottom", function () { ...@@ -2965,7 +2970,7 @@ KityMinder.registerModule( "LayoutBottom", function () {
var sX = rootLayout.x - rootbranchwidth / 2; var sX = rootLayout.x - rootbranchwidth / 2;
for ( var k = 0; k < mainnodes.length; k++ ) { for ( var k = 0; k < mainnodes.length; k++ ) {
var mLayout = mainnodes[ k ].getLayout(); var mLayout = mainnodes[ k ].getLayout();
mLayout.x = sX; mLayout.x = sX + nodeStyles.main.margin[ 3 ] + 5;
sX += mLayout.branchwidth; sX += mLayout.branchwidth;
} }
return mainnodes; return mainnodes;
...@@ -3258,6 +3263,11 @@ KityMinder.registerModule( "LayoutBottom", function () { ...@@ -3258,6 +3263,11 @@ KityMinder.registerModule( "LayoutBottom", function () {
} }
var nodeLayout = nodes[ 0 ].getLayout(); var nodeLayout = nodes[ 0 ].getLayout();
parent.removeChild( nodes[ 0 ] ); parent.removeChild( nodes[ 0 ] );
if ( parent.getType() !== "root" && parent.getChildren().length === 0 ) {
var prtLayout = parent.getLayout();
prtLayout.shicon.remove();
prtLayout.shicon = null;
}
var set = updateLayoutAll( nodes[ 0 ], parent, "remove" ); var set = updateLayoutAll( nodes[ 0 ], parent, "remove" );
for ( var j = 0; j < set.length; j++ ) { for ( var j = 0; j < set.length; j++ ) {
translateNode( set[ j ] ); translateNode( set[ j ] );
...@@ -3916,10 +3926,10 @@ KityMinder.registerModule( "KeyboardModule", function () { ...@@ -3916,10 +3926,10 @@ KityMinder.registerModule( "KeyboardModule", function () {
var pointIndexes = [], var pointIndexes = [],
p; p;
root.traverse( function ( node ) { root.traverse( function ( node ) {
p = node.getData( 'point' ); p = node.getRenderContainer().getRenderBox( 'top' );
pointIndexes.push( { pointIndexes.push( {
x: p.x, x: p.x + p.width / 2,
y: p.y, y: p.y + p.height / 2,
node: node node: node
} ); } );
} ); } );
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -2,7 +2,8 @@ git stash ...@@ -2,7 +2,8 @@ git stash
git checkout gh-pages git checkout gh-pages
git merge dev -m "merge from dev" git merge dev -m "merge from dev"
grunt grunt
git commit -am "publish" git add dist
git commit -m "publish"
git push origin gh-pages git push origin gh-pages
git checkout dev git checkout dev
git stash pop git stash pop
...@@ -174,7 +174,7 @@ KityMinder.registerModule( "LayoutBottom", function () { ...@@ -174,7 +174,7 @@ KityMinder.registerModule( "LayoutBottom", function () {
var sX = rootLayout.x - rootbranchwidth / 2; var sX = rootLayout.x - rootbranchwidth / 2;
for ( var k = 0; k < mainnodes.length; k++ ) { for ( var k = 0; k < mainnodes.length; k++ ) {
var mLayout = mainnodes[ k ].getLayout(); var mLayout = mainnodes[ k ].getLayout();
mLayout.x = sX; mLayout.x = sX + nodeStyles.main.margin[ 3 ] + 5;
sX += mLayout.branchwidth; sX += mLayout.branchwidth;
} }
return mainnodes; return mainnodes;
...@@ -467,6 +467,11 @@ KityMinder.registerModule( "LayoutBottom", function () { ...@@ -467,6 +467,11 @@ KityMinder.registerModule( "LayoutBottom", function () {
} }
var nodeLayout = nodes[ 0 ].getLayout(); var nodeLayout = nodes[ 0 ].getLayout();
parent.removeChild( nodes[ 0 ] ); parent.removeChild( nodes[ 0 ] );
if ( parent.getType() !== "root" && parent.getChildren().length === 0 ) {
var prtLayout = parent.getLayout();
prtLayout.shicon.remove();
prtLayout.shicon = null;
}
var set = updateLayoutAll( nodes[ 0 ], parent, "remove" ); var set = updateLayoutAll( nodes[ 0 ], parent, "remove" );
for ( var j = 0; j < set.length; j++ ) { for ( var j = 0; j < set.length; j++ ) {
translateNode( set[ j ] ); translateNode( set[ j ] );
......
...@@ -596,6 +596,11 @@ KityMinder.registerModule( "LayoutDefault", function () { ...@@ -596,6 +596,11 @@ KityMinder.registerModule( "LayoutDefault", function () {
sideList.splice( index, 1 ); sideList.splice( index, 1 );
} }
parent.removeChild( nodes[ 0 ] ); parent.removeChild( nodes[ 0 ] );
if ( parent.getType() !== "root" && parent.getChildren().length === 0 ) {
var prtLayout = parent.getLayout();
prtLayout.shicon.remove();
prtLayout.shicon = null;
}
var set = updateLayoutVertical( nodes[ 0 ], parent, "remove" ); var set = updateLayoutVertical( nodes[ 0 ], parent, "remove" );
for ( var j = 0; j < set.length; j++ ) { for ( var j = 0; j < set.length; j++ ) {
translateNode( set[ j ] ); translateNode( set[ j ] );
......
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