Commit ba29cdf5 authored by techird's avatar techird

fix navigate to invisible nodes

parent b8941f1a
...@@ -7,26 +7,26 @@ ...@@ -7,26 +7,26 @@
<meta name="description" content="百度脑图,便捷的脑图编辑工具。让您在线上直接创建、保存并分享你的思路。"> <meta name="description" content="百度脑图,便捷的脑图编辑工具。让您在线上直接创建、保存并分享你的思路。">
<script src="lib/jquery-2.1.0.min.js?_=1399822592172" charset="utf-8"></script> <script src="lib/jquery-2.1.0.min.js?_=1399824598062" charset="utf-8"></script>
<script src="lib/ZeroClipboard.min.js?_=1399822592172" charset="utf-8"></script> <script src="lib/ZeroClipboard.min.js?_=1399824598062" charset="utf-8"></script>
<script type="text/javascript"> <script type="text/javascript">
ZeroClipboard.setDefaults( { moviePath: 'lib/ZeroClipboard.swf' } ); ZeroClipboard.setDefaults( { moviePath: 'lib/ZeroClipboard.swf' } );
</script> </script>
<script src="lib/kitygraph.all.min.js?_=1399822592172" charset="utf-8"></script> <script src="lib/kitygraph.all.min.js?_=1399824598062" charset="utf-8"></script>
<script src="kityminder.all.min.js?_=1399822592172" charset="utf-8"></script> <script src="kityminder.all.min.js?_=1399824598062" charset="utf-8"></script>
<script src="kityminder.config.js?_=1399822592172" charset="utf-8"></script> <script src="kityminder.config.js?_=1399824598062" charset="utf-8"></script>
<script src="lang/zh-cn/zh-cn.js?_=1399822592172" charset="utf-8"></script> <script src="lang/zh-cn/zh-cn.js?_=1399824598062" charset="utf-8"></script>
<script src="lib/zip.js?_=1399822592172" charset="utf-8"></script> <script src="lib/zip.js?_=1399824598062" charset="utf-8"></script>
<script> <script>
zip.inflateJSPath = 'lib/inflate.js'; zip.inflateJSPath = 'lib/inflate.js';
</script> </script>
<script src="lib/jquery.xml2json.js?_=1399822592172" charset="utf-8"></script> <script src="lib/jquery.xml2json.js?_=1399824598062" charset="utf-8"></script>
<script src="lib/baidu-frontia-js-full-1.0.0.js?_=1399822592172" charset="utf-8"></script> <script src="lib/baidu-frontia-js-full-1.0.0.js?_=1399824598062" charset="utf-8"></script>
<script src="social/draftmanager.js?_=1399822592172" charset="utf-8"></script> <script src="social/draftmanager.js?_=1399824598062" charset="utf-8"></script>
<script src="social/social.js?_=1399822592172" charset="utf-8"></script> <script src="social/social.js?_=1399824598062" charset="utf-8"></script>
<link href="social/social.css" rel="stylesheet"> <link href="social/social.css" rel="stylesheet">
<link href="themes/default/css/import.css" type="text/css" rel="stylesheet" /> <link href="themes/default/css/import.css" type="text/css" rel="stylesheet" />
......
/*! /*!
* ==================================================== * ====================================================
* kityminder - v1.1.3 - 2014-05-11 * kityminder - v1.1.3 - 2014-05-12
* 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
...@@ -4709,16 +4709,20 @@ KityMinder.registerModule( "KeyboardModule", function () { ...@@ -4709,16 +4709,20 @@ KityMinder.registerModule( "KeyboardModule", function () {
p; p;
root.traverse( function ( node ) { root.traverse( function ( node ) {
p = node.getRenderContainer().getRenderBox( 'top' ); p = node.getRenderContainer().getRenderBox( 'top' );
pointIndexes.push( {
left: p.x, // bugfix: 不应导航到收起的节点(判断其尺寸是否存在)
top: p.y, if ( p.width && p.height ) {
right: p.x + p.width, pointIndexes.push( {
bottom: p.y + p.height, left: p.x,
width: p.width, top: p.y,
height: p.height, right: p.x + p.width,
node: node, bottom: p.y + p.height,
text: node.getText() width: p.width,
} ); height: p.height,
node: node,
text: node.getText()
} );
}
} ); } );
for ( var i = 0; i < pointIndexes.length; i++ ) { for ( var i = 0; i < pointIndexes.length; i++ ) {
findClosestPointsFor( pointIndexes, i ); findClosestPointsFor( pointIndexes, i );
...@@ -4754,8 +4758,10 @@ KityMinder.registerModule( "KeyboardModule", function () { ...@@ -4754,8 +4758,10 @@ KityMinder.registerModule( "KeyboardModule", function () {
var current, dist; var current, dist;
for ( var i = 0; i < pointIndexes.length; i++ ) { for ( var i = 0; i < pointIndexes.length; i++ ) {
if ( i == iFind ) continue; if ( i == iFind ) continue;
current = pointIndexes[ i ]; current = pointIndexes[ i ];
dist = getCoefedDistance( current, find ); dist = getCoefedDistance( current, find );
// left check // left check
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -10,16 +10,20 @@ KityMinder.registerModule( "KeyboardModule", function () { ...@@ -10,16 +10,20 @@ KityMinder.registerModule( "KeyboardModule", function () {
p; p;
root.traverse( function ( node ) { root.traverse( function ( node ) {
p = node.getRenderContainer().getRenderBox( 'top' ); p = node.getRenderContainer().getRenderBox( 'top' );
pointIndexes.push( {
left: p.x, // bugfix: 不应导航到收起的节点(判断其尺寸是否存在)
top: p.y, if ( p.width && p.height ) {
right: p.x + p.width, pointIndexes.push( {
bottom: p.y + p.height, left: p.x,
width: p.width, top: p.y,
height: p.height, right: p.x + p.width,
node: node, bottom: p.y + p.height,
text: node.getText() width: p.width,
} ); height: p.height,
node: node,
text: node.getText()
} );
}
} ); } );
for ( var i = 0; i < pointIndexes.length; i++ ) { for ( var i = 0; i < pointIndexes.length; i++ ) {
findClosestPointsFor( pointIndexes, i ); findClosestPointsFor( pointIndexes, i );
...@@ -55,8 +59,10 @@ KityMinder.registerModule( "KeyboardModule", function () { ...@@ -55,8 +59,10 @@ KityMinder.registerModule( "KeyboardModule", function () {
var current, dist; var current, dist;
for ( var i = 0; i < pointIndexes.length; i++ ) { for ( var i = 0; i < pointIndexes.length; i++ ) {
if ( i == iFind ) continue; if ( i == iFind ) continue;
current = pointIndexes[ i ]; current = pointIndexes[ i ];
dist = getCoefedDistance( current, find ); dist = getCoefedDistance( current, find );
// left check // left check
......
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