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
459155f6
Commit
459155f6
authored
May 07, 2014
by
Akikonata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed
parent
b8955dbe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
10 deletions
+13
-10
layout.default.js
src/module/layout.default.js
+7
-4
layout.js
src/module/layout.js
+6
-6
No files found.
src/module/layout.default.js
View file @
459155f6
...
@@ -510,7 +510,6 @@ KityMinder.registerModule( "LayoutDefault", function () {
...
@@ -510,7 +510,6 @@ KityMinder.registerModule( "LayoutDefault", function () {
},
},
initStyle
:
function
(
expandall
)
{
initStyle
:
function
(
expandall
)
{
var
_root
=
minder
.
getRoot
();
var
_root
=
minder
.
getRoot
();
//debugger;
var
historyPoint
=
_root
.
getPoint
();
var
historyPoint
=
_root
.
getPoint
();
if
(
historyPoint
)
historyPoint
=
JSON
.
parse
(
JSON
.
stringify
(
historyPoint
)
);
if
(
historyPoint
)
historyPoint
=
JSON
.
parse
(
JSON
.
stringify
(
historyPoint
)
);
minder
.
handelNodeInsert
(
_root
);
minder
.
handelNodeInsert
(
_root
);
...
@@ -572,6 +571,13 @@ KityMinder.registerModule( "LayoutDefault", function () {
...
@@ -572,6 +571,13 @@ KityMinder.registerModule( "LayoutDefault", function () {
(
(
sub_nolimit
||
(
c
.
length
<=
expandoptions
.
defaultSubShow
)
)
&&
(
layer_nolimit
||
(
cur_layer
<=
expand_layer
)
)
)
||
(
(
sub_nolimit
||
(
c
.
length
<=
expandoptions
.
defaultSubShow
)
)
&&
(
layer_nolimit
||
(
cur_layer
<=
expand_layer
)
)
)
||
_buffer
[
j
].
getLayout
().
expand
_buffer
[
j
].
getLayout
().
expand
)
&&
c
.
length
!==
0
)
{
)
&&
c
.
length
!==
0
)
{
if
(
_buffer
[
j
].
getLayout
().
expand
)
{
console
.
log
(
(
(
(
(
sub_nolimit
||
(
c
.
length
<=
expandoptions
.
defaultSubShow
)
)
&&
(
layer_nolimit
||
(
cur_layer
<=
expand_layer
)
)
)
||
_buffer
[
j
].
getLayout
().
expand
)
&&
c
.
length
!==
0
)
);
}
this
.
expandNode
(
_buffer
[
j
]
);
this
.
expandNode
(
_buffer
[
j
]
);
_buffer
=
_buffer
.
concat
(
_buffer
[
j
].
getChildren
()
);
_buffer
=
_buffer
.
concat
(
_buffer
[
j
].
getChildren
()
);
}
}
...
@@ -590,9 +596,6 @@ KityMinder.registerModule( "LayoutDefault", function () {
...
@@ -590,9 +596,6 @@ KityMinder.registerModule( "LayoutDefault", function () {
if
(
Layout
)
{
if
(
Layout
)
{
oldExpand
=
Layout
.
expand
;
oldExpand
=
Layout
.
expand
;
}
}
if
(
oldExpand
)
{
alert
(
'aru'
);
}
node
.
clearLayout
();
node
.
clearLayout
();
node
.
getContRc
().
clear
();
node
.
getContRc
().
clear
();
Layout
=
node
.
getLayout
();
Layout
=
node
.
getLayout
();
...
...
src/module/layout.js
View file @
459155f6
...
@@ -40,7 +40,12 @@ KityMinder.registerModule( "LayoutModule", function () {
...
@@ -40,7 +40,12 @@ KityMinder.registerModule( "LayoutModule", function () {
var
_root
=
this
.
getRoot
();
var
_root
=
this
.
getRoot
();
_root
.
preTraverse
(
function
(
n
)
{
_root
.
preTraverse
(
function
(
n
)
{
var
oldExpand
;
if
(
n
.
getLayout
()
)
{
oldExpand
=
n
.
getLayout
().
expand
;
}
n
.
clearLayout
();
n
.
clearLayout
();
n
.
getLayout
().
expand
=
oldExpand
;
}
);
}
);
this
.
getLayoutStyle
(
curStyle
).
initStyle
.
call
(
this
,
expandall
);
this
.
getLayoutStyle
(
curStyle
).
initStyle
.
call
(
this
,
expandall
);
this
.
fire
(
'afterinitstyle'
);
this
.
fire
(
'afterinitstyle'
);
...
@@ -251,12 +256,7 @@ KityMinder.registerModule( "LayoutModule", function () {
...
@@ -251,12 +256,7 @@ KityMinder.registerModule( "LayoutModule", function () {
"cloneNode"
:
function
(
e
)
{
"cloneNode"
:
function
(
e
)
{
var
target
=
e
.
targetNode
;
var
target
=
e
.
targetNode
;
var
source
=
e
.
sourceNode
;
var
source
=
e
.
sourceNode
;
target
.
clearLayout
();
target
.
_layout
=
utils
.
extend
(
{},
source
.
_layout
);
var
sourceLayout
=
source
.
getLayout
();
var
targetLayout
=
target
.
getLayout
();
targetLayout
.
expand
=
utils
.
clone
(
sourceLayout
.
expand
);
console
.
log
(
targetLayout
);
}
}
},
},
'contextmenu'
:
[
{
'contextmenu'
:
[
{
...
...
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