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
981e1fec
Commit
981e1fec
authored
May 04, 2014
by
campaign
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
90a6da8d
97a03b73
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
14 deletions
+12
-14
kityminder.config.js
kityminder.config.js
+3
-3
layout.default.js
src/module/layout.default.js
+5
-7
layout.js
src/module/layout.js
+4
-4
No files found.
kityminder.config.js
View file @
981e1fec
...
...
@@ -81,9 +81,9 @@
//设置km整体的z-index大小
//,zIndex : 1000
//设置初始加载时展开的层数和子节点数目阈值
//,
e
xpand: {
//
l
ayer: 0,
//
sub
: 0
//,
defaultE
xpand: {
//
defaultL
ayer: 0,
//
defaultSubShow
: 0
//}
};
}
)();
\ No newline at end of file
src/module/layout.default.js
View file @
981e1fec
...
...
@@ -33,7 +33,6 @@ KityMinder.registerModule( "LayoutDefault", function () {
minder
.
getRenderContainer
().
addShape
(
iconShape
);
iconShape
.
addShapes
(
[
circle
,
plus
,
dec
]
);
this
.
update
();
//this.switchState();
},
switchState
:
function
()
{
if
(
!
this
.
_show
)
{
...
...
@@ -537,9 +536,9 @@ KityMinder.registerModule( "LayoutDefault", function () {
updateLayoutVertical
(
_root
);
translateNode
(
_root
);
if
(
historyPoint
)
_root
.
setPoint
(
historyPoint
.
x
,
historyPoint
.
y
);
var
expandoptions
=
minder
.
getOptions
(
'
e
xpand'
);
var
expandoptions
=
minder
.
getOptions
(
'
defaultE
xpand'
);
var
cur_layer
=
0
;
var
expand_layer
=
expandoptions
.
l
ayer
;
var
expand_layer
=
expandoptions
.
defaultL
ayer
;
var
mains
=
_root
.
getChildren
();
for
(
var
i
=
0
;
i
<
mains
.
length
;
i
++
)
{
this
.
appendChildNode
(
_root
,
mains
[
i
]
);
...
...
@@ -555,8 +554,7 @@ KityMinder.registerModule( "LayoutDefault", function () {
}
)();
next
=
[];
var
layer_nolimit
=
(
expand_layer
<
1
)
||
(
!
expand_layer
)
||
false
;
//debugger;
var
sub_nolimit
=
(
expandoptions
.
sub
<
0
)
||
false
;
var
sub_nolimit
=
(
expandoptions
.
defaultSubShow
<
1
)
||
false
;
var
loopcontinue
=
function
()
{
return
(
layer_nolimit
?
(
_buffer
.
length
!==
0
)
:
(
_buffer
.
length
!==
0
&&
cur_layer
<
expand_layer
)
);
};
...
...
@@ -565,7 +563,7 @@ KityMinder.registerModule( "LayoutDefault", function () {
var
layer_len
=
_buffer
.
length
;
for
(
var
j
=
0
;
j
<
layer_len
;
j
++
)
{
var
c
=
_buffer
[
j
].
getChildren
();
if
(
(
sub_nolimit
||
(
c
.
length
<=
expandoptions
.
sub
)
)
&&
c
.
length
!==
0
)
{
if
(
(
sub_nolimit
||
(
c
.
length
<=
expandoptions
.
defaultSubShow
)
)
&&
c
.
length
!==
0
)
{
this
.
expandNode
(
_buffer
[
j
]
);
_buffer
=
_buffer
.
concat
(
_buffer
[
j
].
getChildren
()
);
}
...
...
src/module/layout.js
View file @
981e1fec
...
...
@@ -251,9 +251,9 @@ KityMinder.registerModule( "LayoutModule", function () {
'appendchildnode'
:
'appendchildnode'
,
'removenode'
:
'removenode'
},
expand
:
{
layer
:
0
,
sub
:
0
'defaultExpand'
:
{
'defaultLayer'
:
0
,
'defaultSubShow'
:
0
}
}
};
...
...
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