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
f0b86460
Commit
f0b86460
authored
May 18, 2014
by
Akikonata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
recover main
parent
5e7f597e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
8 deletions
+19
-8
layout.bottom.js
src/module/layout.bottom.js
+19
-8
No files found.
src/module/layout.bottom.js
View file @
f0b86460
...
...
@@ -173,11 +173,19 @@ KityMinder.registerModule("LayoutBottom", function () {
};
var
updateLayoutMain
=
function
()
{
var
_root
=
minder
.
getRoot
();
var
mainnodes
=
_root
.
getChildren
();
var
mainnodes
=
(
function
()
{
var
main_added
=
[];
var
children
=
_root
.
getChildren
();
for
(
var
i
=
0
;
i
<
children
.
length
;
i
++
)
{
if
(
children
[
i
].
getLayout
().
added
)
main_added
.
push
(
children
[
i
]);
}
return
main_added
;
})();
var
countMainWidth
=
function
(
node
)
{
var
nLayout
=
node
.
getLayout
();
var
selfwidth
=
node
.
getRenderContainer
().
getWidth
()
+
nodeStyles
.
main
.
margin
[
1
]
+
nodeStyles
.
main
.
margin
[
3
];
var
childwidth
=
nLayout
.
subgroup
.
getWidth
()
+
nodeStyles
.
main
.
margin
[
1
]
+
nodeStyles
.
sub
.
margin
[
3
];
var
childwidth
=
0
;
if
(
nLayout
.
added
)
childwidth
=
nLayout
.
subgroup
.
getWidth
()
+
nodeStyles
.
main
.
margin
[
1
]
+
nodeStyles
.
sub
.
margin
[
3
];
var
branchwidth
=
nLayout
.
branchwidth
=
(
selfwidth
>
childwidth
?
selfwidth
:
childwidth
);
return
branchwidth
;
};
...
...
@@ -433,7 +441,10 @@ KityMinder.registerModule("LayoutBottom", function () {
var
_buffer
=
[
_root
];
var
_cleanbuffer
=
[];
var
mains
=
_root
.
getChildren
();
for
(
var
i
=
0
;
i
<
mains
.
length
;
i
++
)
{
this
.
appendChildNode
(
_root
,
mains
[
i
]);
}
//打散结构
// while (_buffer.length !== 0) {
// var children = _buffer[0].getChildren();
...
...
@@ -494,11 +505,11 @@ KityMinder.registerModule("LayoutBottom", function () {
},
false
));
updateBg
(
node
);
updateShapeByCont
(
node
);
//
var set = updateLayoutAll(node, parent, "append");
//
for (var i = 0; i < set.length; i++) {
//
translateNode(set [i]);
//
updateConnectAndshIcon(set [i]);
//
}
var
set
=
updateLayoutAll
(
node
,
parent
,
"append"
);
for
(
var
i
=
0
;
i
<
set
.
length
;
i
++
)
{
translateNode
(
set
[
i
]);
updateConnectAndshIcon
(
set
[
i
]);
}
// if (node.getType() === "sub") {
// var set1 = updateLayoutMain();
// for (var j = 0; j < set1.length; j++) {
...
...
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