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
6438da2d
Commit
6438da2d
authored
Feb 09, 2014
by
Akikonata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new style
parent
fe1c871e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
9 deletions
+21
-9
layout.bottom.js
src/module/layout.bottom.js
+21
-9
No files found.
src/module/layout.bottom.js
View file @
6438da2d
...
@@ -141,7 +141,7 @@ KityMinder.registerModule( "LayoutBottom", function () {
...
@@ -141,7 +141,7 @@ KityMinder.registerModule( "LayoutBottom", function () {
var
highlightshape
=
this
.
_highlightshape
=
new
kity
.
Rect
();
var
highlightshape
=
this
.
_highlightshape
=
new
kity
.
Rect
();
bgRc
.
addShapes
(
[
highlightshape
,
underline
]
);
bgRc
.
addShapes
(
[
highlightshape
,
underline
]
);
var
connect
=
this
.
_connect
=
new
kity
.
Path
();
var
connect
=
this
.
_connect
=
new
kity
.
Path
();
minder
.
getRenderContainer
().
addShape
(
connect
)
.
bringTop
(
minder
.
getRoot
().
getRenderContainer
()
)
;
minder
.
getRenderContainer
().
addShape
(
connect
);
var
Layout
=
{
var
Layout
=
{
stroke
:
new
kity
.
Pen
(
"white"
,
1
).
setLineCap
(
"round"
).
setLineJoin
(
"round"
),
stroke
:
new
kity
.
Pen
(
"white"
,
1
).
setLineCap
(
"round"
).
setLineJoin
(
"round"
),
color
:
"white"
,
color
:
"white"
,
...
@@ -181,15 +181,23 @@ KityMinder.registerModule( "LayoutBottom", function () {
...
@@ -181,15 +181,23 @@ KityMinder.registerModule( "LayoutBottom", function () {
this
.
updateShIcon
();
this
.
updateShIcon
();
},
},
updateConnect
:
function
()
{
updateConnect
:
function
()
{
var
connect
=
this
.
_connect
;
var
node
=
this
.
_node
;
var
node
=
this
.
_node
;
var
parentShape
=
node
.
getParent
().
getRenderContainer
();
var
parentBox
=
parentShape
.
getRenderBox
();
var
parentLayout
=
node
.
getParent
().
getData
(
"layout"
);
var
Layout
=
node
.
getData
(
"layout"
);
var
Layout
=
node
.
getData
(
"layout"
);
var
Shape
=
node
.
getRenderContainer
();
if
(
Layout
.
x
&&
Layout
.
y
)
{
var
sX
,
sY
=
parentLayout
.
y
;
var
connect
=
this
.
_connect
;
var
nodeX
,
nodeY
=
Shape
.
getRenderBox
().
closurePoints
[
1
].
y
;
var
parent
=
node
.
getParent
();
var
parentLayout
=
parent
.
getData
(
"layout"
);
var
sX
=
parentLayout
.
x
+
10.5
,
pY
=
parentLayout
.
y
+
parent
.
getRenderContainer
().
getHeight
()
+
10.5
,
sY
=
Layout
.
y
+
0.5
;
connect
.
getDrawer
()
.
clear
()
.
moveTo
(
sX
,
pY
)
.
lineTo
(
sX
,
sY
)
.
lineTo
(
Layout
.
x
+
0.5
,
sY
)
.
lineTo
(
Layout
.
x
+
0.5
,
Layout
.
y
+
node
.
getRenderContainer
().
getHeight
()
);
connect
.
stroke
(
"white"
);
}
},
},
updateShIcon
:
function
()
{
updateShIcon
:
function
()
{
this
.
_shicon
.
update
();
this
.
_shicon
.
update
();
...
@@ -284,7 +292,11 @@ KityMinder.registerModule( "LayoutBottom", function () {
...
@@ -284,7 +292,11 @@ KityMinder.registerModule( "LayoutBottom", function () {
}
)();
}
)();
Layout
.
branchwidth
=
(
nodewidth
>
nodeChildWidth
?
nodewidth
:
nodeChildWidth
);
Layout
.
branchwidth
=
(
nodewidth
>
nodeChildWidth
?
nodewidth
:
nodeChildWidth
);
};
};
countBranchWidth
(
node
);
var
parent
=
node
;
while
(
parent
)
{
countBranchWidth
(
parent
);
parent
=
parent
.
getParent
();
}
while
(
_buffer
.
length
!==
0
)
{
while
(
_buffer
.
length
!==
0
)
{
_buffer
=
_buffer
.
concat
(
_buffer
[
0
].
getChildren
()
);
_buffer
=
_buffer
.
concat
(
_buffer
[
0
].
getChildren
()
);
var
bufferLayout
=
_buffer
[
0
].
getData
(
"layout"
);
var
bufferLayout
=
_buffer
[
0
].
getData
(
"layout"
);
...
...
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