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
c1aa09cd
Commit
c1aa09cd
authored
Jun 26, 2014
by
Akikonata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed layout
parent
65e58fb0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
7 deletions
+6
-7
kity
kity
+1
-1
bottom.js
src/layout/bottom.js
+1
-2
filetree.js
src/layout/filetree.js
+1
-1
bottom.js
src/theme/bottom.js
+1
-1
filetree.js
src/theme/filetree.js
+2
-2
No files found.
kity
@
7c5ee097
Subproject commit
5382742eb5b1764af2bb4fdf4fa7565318bfbb78
Subproject commit
7c5ee097334581f51ae994ff3c5d51f96d5ac260
src/layout/bottom.js
View file @
c1aa09cd
...
...
@@ -33,6 +33,7 @@ KityMinder.registerLayout('bottom', kity.createClass({
return
box
;
});
var
nodeContentBox
=
node
.
getContentBox
();
node
.
setLayoutVector
(
new
kity
.
Vector
(
nodeContentBox
.
cx
-
5
,
nodeContentBox
.
bottom
));
var
i
,
x
,
y
,
child
,
childTreeBox
,
childContentBox
;
var
transform
=
new
kity
.
Matrix
();
x
=
-
totalTreeWidth
/
2
;
...
...
@@ -50,7 +51,6 @@ KityMinder.registerLayout('bottom', kity.createClass({
y
=
nodeContentBox
.
height
+
node
.
getStyle
(
'margin-bottom'
)
+
children
[
i
].
getStyle
(
'margin-top'
);
children
[
i
].
setLayoutTransform
(
new
kity
.
Matrix
().
translate
(
x
,
y
));
x
+=
childTreeBox
.
width
/
2
+
children
[
i
].
getStyle
(
'margin-right'
);
child
.
setLayoutVector
(
new
kity
.
Vector
(
childContentBox
.
cx
-
5
,
childContentBox
.
bottom
));
}
}
}
...
...
@@ -64,6 +64,5 @@ KityMinder.registerConnectProvider('bottom', function(node, parent, connection)
pathData
.
push
(
'L'
,
new
kity
.
Point
(
pBox
.
cx
,
pBox
.
bottom
+
parent
.
getStyle
(
'margin-bottom'
)));
pathData
.
push
(
'L'
,
new
kity
.
Point
(
box
.
cx
,
pBox
.
bottom
+
parent
.
getStyle
(
'margin-bottom'
)));
pathData
.
push
(
'L'
,
new
kity
.
Point
(
box
.
cx
,
box
.
top
));
console
.
log
(
pathData
);
connection
.
setPathData
(
pathData
);
});
\ No newline at end of file
src/layout/filetree.js
View file @
c1aa09cd
...
...
@@ -28,6 +28,7 @@ KityMinder.registerLayout('filetree', kity.createClass({
return
box
;
});
var
nodeContentBox
=
node
.
getContentBox
();
node
.
setLayoutVector
(
new
kity
.
Vector
(
nodeContentBox
.
left
+
6
,
nodeContentBox
.
bottom
));
var
i
,
x
,
y
,
child
,
childTreeBox
,
childContentBox
;
var
transform
=
new
kity
.
Matrix
();
y
=
nodeContentBox
.
bottom
+
node
.
getStyle
(
'margin-bottom'
);
...
...
@@ -41,7 +42,6 @@ KityMinder.registerLayout('filetree', kity.createClass({
y
+=
child
.
getStyle
(
'margin-top'
);
child
.
setLayoutTransform
(
new
kity
.
Matrix
().
translate
(
x
,
y
));
y
+=
childTreeBox
.
height
+
children
[
i
].
getStyle
(
'margin-bottom'
);
child
.
setLayoutVector
(
new
kity
.
Vector
(
childContentBox
.
left
+
6
,
childContentBox
.
bottom
));
}
}
},
...
...
src/theme/bottom.js
View file @
c1aa09cd
...
...
@@ -14,7 +14,7 @@ KityMinder.registerTheme('bottom', {
'main-font-size'
:
16
,
'main-padding'
:
[
6
,
20
],
'main-margin'
:
[
30
,
0
,
10
,
0
],
'main-radius'
:
10
,
'main-radius'
:
5
,
'main-space'
:
5
,
'sub-color'
:
'white'
,
...
...
src/theme/filetree.js
View file @
c1aa09cd
...
...
@@ -14,7 +14,7 @@ KityMinder.registerTheme('filetree', {
'main-font-size'
:
16
,
'main-padding'
:
[
6
,
20
],
'main-margin'
:
[
15
,
15
,
15
,
10
],
'main-radius'
:
1
0
,
'main-radius'
:
0
,
'main-space'
:
5
,
'sub-color'
:
'black'
,
...
...
@@ -23,7 +23,7 @@ KityMinder.registerTheme('filetree', {
'sub-font-size'
:
12
,
'sub-padding'
:
[
5
,
10
],
'sub-margin'
:
[
15
,
15
,
15
,
10
],
'sub-radius'
:
5
,
'sub-radius'
:
0
,
'sub-space'
:
5
,
'connect-color'
:
'white'
,
...
...
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