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
0c1f2f04
Commit
0c1f2f04
authored
Feb 18, 2014
by
Akikonata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed rule
parent
0da4bf73
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
layout.default.js
src/module/layout.default.js
+12
-2
No files found.
src/module/layout.default.js
View file @
0c1f2f04
...
...
@@ -121,7 +121,7 @@ KityMinder.registerModule( "LayoutDefault", function () {
case
"sub"
:
var
underline
=
Layout
.
underline
=
new
kity
.
Path
();
var
highlightshape
=
Layout
.
highlightshape
=
new
kity
.
Rect
().
setRadius
(
4
);
node
.
getBgRc
().
clear
().
addShapes
(
[
Layout
.
bgRect
=
new
kity
.
Rect
().
setRadius
(
4
),
highlightshape
,
underline
]
);
node
.
getBgRc
().
clear
().
addShapes
(
[
Layout
.
bgRect
=
new
kity
.
Rect
().
setRadius
(
4
),
highlightshape
,
underline
]
);
break
;
default
:
break
;
...
...
@@ -170,7 +170,7 @@ KityMinder.registerModule( "LayoutDefault", function () {
Layout
.
highlightshape
.
setWidth
(
_contWidth
+
nodeStyle
.
padding
[
1
]
+
nodeStyle
.
padding
[
3
]
)
.
setHeight
(
_contHeight
+
nodeStyle
.
padding
[
0
]
+
nodeStyle
.
padding
[
2
]
);
Layout
.
bgRect
.
setWidth
(
width
).
setHeight
(
height
);
Layout
.
bgRect
.
setWidth
(
width
).
setHeight
(
height
);
break
;
default
:
break
;
...
...
@@ -475,6 +475,16 @@ KityMinder.registerModule( "LayoutDefault", function () {
Layout
.
align
=
siblingLayout
.
align
;
parent
.
insertChild
(
node
,
sibling
.
getIndex
()
+
1
);
if
(
parent
.
getType
()
===
"root"
)
{
var
len
=
parent
.
getChildren
().
length
;
if
(
len
<
7
)
{
if
(
len
%
2
)
{
Layout
.
appendside
=
"right"
;
Layout
.
align
=
"left"
;
}
else
{
Layout
.
appendside
=
"left"
;
Layout
.
align
=
"right"
;
}
}
var
sideList
=
parentLayout
[
Layout
.
appendside
+
"List"
];
var
idx
=
sideList
.
indexOf
(
sibling
);
sideList
.
splice
(
idx
+
1
,
0
,
node
);
...
...
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