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
91b21a7c
Commit
91b21a7c
authored
May 07, 2014
by
Akikonata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added collapse
parent
2b12ff28
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
expand.js
src/module/expand.js
+1
-1
layout.default.js
src/module/layout.default.js
+4
-1
No files found.
src/module/expand.js
View file @
91b21a7c
...
@@ -86,7 +86,7 @@ KityMinder.registerModule( "Expand", function () {
...
@@ -86,7 +86,7 @@ KityMinder.registerModule( "Expand", function () {
*/
*/
collapse
:
function
(
policy
)
{
collapse
:
function
(
policy
)
{
policy
=
policy
||
EXPAND_POLICY
.
KEEP_STATE
;
policy
=
policy
||
EXPAND_POLICY
.
KEEP_STATE
;
policy
(
this
,
STATE_
EXPAND
,
policy
);
policy
(
this
,
STATE_
COLLAPSE
,
policy
);
return
this
;
return
this
;
},
},
...
...
src/module/layout.default.js
View file @
91b21a7c
...
@@ -34,7 +34,9 @@ KityMinder.registerModule( "LayoutDefault", function () {
...
@@ -34,7 +34,9 @@ KityMinder.registerModule( "LayoutDefault", function () {
iconShape
.
addShapes
(
[
circle
,
plus
,
dec
]
);
iconShape
.
addShapes
(
[
circle
,
plus
,
dec
]
);
this
.
update
();
this
.
update
();
},
},
switchState
:
function
()
{
switchState
:
function
(
val
)
{
if
(
val
===
true
||
val
===
false
)
this
.
_show
=
!
val
;
if
(
!
this
.
_show
)
{
if
(
!
this
.
_show
)
{
this
.
_plus
.
setOpacity
(
0
);
this
.
_plus
.
setOpacity
(
0
);
this
.
_dec
.
setOpacity
(
1
);
this
.
_dec
.
setOpacity
(
1
);
...
@@ -567,6 +569,7 @@ KityMinder.registerModule( "LayoutDefault", function () {
...
@@ -567,6 +569,7 @@ KityMinder.registerModule( "LayoutDefault", function () {
while
(
_buffer
.
length
!==
0
)
{
while
(
_buffer
.
length
!==
0
)
{
var
c
=
_buffer
[
0
].
getChildren
();
var
c
=
_buffer
[
0
].
getChildren
();
if
(
_buffer
[
0
].
isExpanded
()
&&
c
.
length
!==
0
)
{
if
(
_buffer
[
0
].
isExpanded
()
&&
c
.
length
!==
0
)
{
_buffer
[
0
].
getLayout
().
shicon
.
switchState
(
true
);
for
(
var
x
=
0
;
x
<
c
.
length
;
x
++
)
{
for
(
var
x
=
0
;
x
<
c
.
length
;
x
++
)
{
minder
.
appendChildNode
(
_buffer
[
0
],
c
[
x
]
);
minder
.
appendChildNode
(
_buffer
[
0
],
c
[
x
]
);
}
}
...
...
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