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
09315d6f
Commit
09315d6f
authored
May 07, 2014
by
Akikonata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added value setting
parent
a0ecff6d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
27 deletions
+3
-27
expand.js
src/module/expand.js
+1
-2
layout.default.js
src/module/layout.default.js
+2
-25
No files found.
src/module/expand.js
View file @
09315d6f
...
...
@@ -47,8 +47,7 @@ KityMinder.registerModule( "Expand", function () {
node
.
setData
(
EXPAND_STATE_DATA
,
STATE_COLLAPSE
);
},
isExpanded
:
function
()
{
//return this.getData( EXPAND_STATE_DATA ) === STATE_EXPAND;
return
true
;
return
this
.
getData
(
EXPAND_STATE_DATA
)
===
STATE_EXPAND
;
}
}
);
return
{
...
...
src/module/layout.default.js
View file @
09315d6f
...
...
@@ -562,6 +562,7 @@ KityMinder.registerModule( "LayoutDefault", function () {
}
var
_buffer
;
if
(
isExpand
)
{
node
.
expand
();
//遍历子树展开需要展开的节点
_buffer
=
[
node
];
debugger
;
...
...
@@ -576,6 +577,7 @@ KityMinder.registerModule( "LayoutDefault", function () {
_buffer
.
shift
();
}
}
else
{
node
.
collapse
();
//遍历子树移除需要移除的节点
_buffer
=
node
.
getChildren
();
while
(
_buffer
.
length
!==
0
)
{
...
...
@@ -595,31 +597,6 @@ KityMinder.registerModule( "LayoutDefault", function () {
updateConnectAndshIcon
(
set
[
i
]
);
}
}
// var _buffer = node.getChildren();
// if ( isExpand ) {
// for ( var j = 0; j < _buffer.length; j++ ) {
// minder.appendChildNode( node, _buffer[ j ] );
// }
// } else {
// var _buffer = node.getChildren();
// while ( _buffer.length !== 0 ) {
// var Layout = _buffer[ 0 ].getLayout();
// if ( Layout.added ) {
// Layout.added = false;
// _buffer[ 0 ].getRenderContainer().remove();
// Layout.connect.remove();
// if ( Layout.shicon ) Layout.shicon.remove();
// }
// _buffer = _buffer.concat( _buffer[ 0 ].getChildren() );
// _buffer.shift();
// }
// }
// var set = [];
// if ( !isExpand ) set = updateLayoutVertical( node, node.getParent(), "contract" );
// for ( var i = 0; i < set.length; i++ ) {
// translateNode( set[ i ] );
// updateConnectAndshIcon( set[ i ] );
// }
},
appendChildNode
:
function
(
parent
,
node
,
focus
,
sibling
)
{
minder
.
handelNodeInsert
(
node
);
...
...
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