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
7ee1cf20
Commit
7ee1cf20
authored
Feb 04, 2014
by
Akikonata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added node move
parent
10f21447
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
8 deletions
+17
-8
kity
kity
+1
-1
layout.default.js
src/module/layout.default.js
+16
-6
layout.green.js
src/module/layout.green.js
+0
-1
No files found.
kity
@
cfe7d5a2
Subproject commit
8b33f729a570f3501769d16ad4c329c0e7f4e08d
Subproject commit
cfe7d5a248f0634d85dab3e51dc2d90d2d23ac5e
src/module/layout.default.js
View file @
7ee1cf20
...
@@ -355,12 +355,19 @@ KityMinder.registerModule( "LayoutDefault", function () {
...
@@ -355,12 +355,19 @@ KityMinder.registerModule( "LayoutDefault", function () {
//以某个节点为seed对水平方向进行调整(包括调整子树)
//以某个节点为seed对水平方向进行调整(包括调整子树)
var
updateLayoutHorizon
=
function
(
node
)
{
var
updateLayoutHorizon
=
function
(
node
)
{
var
nodeLayout
=
node
.
getData
(
"layout"
);
var
effectSet
=
[];
//返回受影响(即需要进行下一步translate的节点)
var
effectSet
=
[
node
];
//返回受影响(即需要进行下一步translate的节点)
var
_buffer
=
[
node
];
var
parent
=
node
.
getParent
();
while
(
_buffer
.
length
!==
0
)
{
var
parent
=
_buffer
[
0
].
getParent
();
_buffer
=
_buffer
.
concat
(
_buffer
[
0
].
getChildren
()
);
if
(
!
parent
)
{
_buffer
.
shift
();
continue
;
}
var
nodeLayout
=
_buffer
[
0
].
getData
(
"layout"
);
var
appendside
=
nodeLayout
.
appendside
;
var
appendside
=
nodeLayout
.
appendside
;
var
selfWidth
=
node
.
getRenderContainer
().
getWidth
();
var
selfWidth
=
_buffer
[
0
]
.
getRenderContainer
().
getWidth
();
if
(
parent
)
{
var
parentLayout
=
parent
.
getData
(
"layout"
);
var
parentLayout
=
parent
.
getData
(
"layout"
);
var
parentWidth
=
parent
.
getRenderContainer
().
getWidth
();
var
parentWidth
=
parent
.
getRenderContainer
().
getWidth
();
if
(
parentLayout
.
align
===
"center"
)
parentWidth
=
parentWidth
/
2
;
if
(
parentLayout
.
align
===
"center"
)
parentWidth
=
parentWidth
/
2
;
...
@@ -376,6 +383,9 @@ KityMinder.registerModule( "LayoutDefault", function () {
...
@@ -376,6 +383,9 @@ KityMinder.registerModule( "LayoutDefault", function () {
default
:
default
:
break
;
break
;
}
}
effectSet
.
push
(
_buffer
[
0
]
);
_buffer
.
shift
();
}
}
return
effectSet
;
return
effectSet
;
};
};
...
...
src/module/layout.green.js
View file @
7ee1cf20
...
@@ -421,7 +421,6 @@ KityMinder.registerModule( "LayoutGreen", function () {
...
@@ -421,7 +421,6 @@ KityMinder.registerModule( "LayoutGreen", function () {
initStyle
:
function
()
{
initStyle
:
function
()
{
//绘制root并且调整到正确位置
//绘制root并且调整到正确位置
var
_root
=
this
.
getRoot
();
var
_root
=
this
.
getRoot
();
minder
.
getRenderContainer
().
clear
();
minder
.
handelNodeInsert
(
_root
);
minder
.
handelNodeInsert
(
_root
);
var
rc
=
new
RootShape
(
_root
);
var
rc
=
new
RootShape
(
_root
);
translateNode
(
_root
);
translateNode
(
_root
);
...
...
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