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
33bd6dda
Commit
33bd6dda
authored
Jan 21, 2016
by
hy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复当节点>200, layout不使用动画时, layoutfinishall变为同步逻辑, 外部minder.on事件被提前录入导致BUG的问题
parent
f436334f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
layout.js
src/core/layout.js
+12
-5
No files found.
src/core/layout.js
View file @
33bd6dda
...
...
@@ -408,9 +408,9 @@ define(function(require, exports, module) {
}
var
layout
=
node
.
getLayoutInstance
();
var
childrenInFlow
=
node
.
getChildren
().
filter
(
function
(
child
)
{
return
!
child
.
hasLayoutOffset
();
});
//
var childrenInFlow = node.getChildren().filter(function(child) {
//
return !child.hasLayoutOffset();
//
});
layout
.
doLayout
(
node
,
node
.
getChildren
(),
round
);
}
...
...
@@ -422,7 +422,14 @@ define(function(require, exports, module) {
var
minder
=
this
;
this
.
applyLayoutResult
(
this
.
getRoot
(),
duration
,
function
()
{
minder
.
fire
(
'layoutallfinish'
);
/**
* 当节点>200, 不使用动画时, 此处逻辑变为同步逻辑, 外部minder.on事件无法
* 被提前录入, 因此增加setTimeout
* @author Naixor
*/
setTimeout
(
function
()
{
minder
.
fire
(
'layoutallfinish'
);
},
0
);
});
return
this
.
fire
(
'layout'
);
...
...
@@ -513,4 +520,4 @@ define(function(require, exports, module) {
});
module
.
exports
=
Layout
;
});
\ No newline at end of file
});
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