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
744c5568
Commit
744c5568
authored
May 04, 2014
by
Akikonata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added spacing
parent
8d5fa8f0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
7 deletions
+22
-7
kityminder.config.js
kityminder.config.js
+1
-1
icon.js
src/module/icon.js
+4
-2
layout.default.js
src/module/layout.default.js
+16
-3
nodetext.js
src/module/nodetext.js
+1
-1
No files found.
kityminder.config.js
View file @
744c5568
...
@@ -83,7 +83,7 @@
...
@@ -83,7 +83,7 @@
//设置初始加载时展开的层数和子节点数目阈值
//设置初始加载时展开的层数和子节点数目阈值
,
,
expand
:
{
expand
:
{
layer
:
5
,
//最小为1
layer
:
2
,
//最小为1
sub
:
10
sub
:
10
}
}
};
};
...
...
src/module/icon.js
View file @
744c5568
KityMinder
.
registerModule
(
"IconModule"
,
function
()
{
KityMinder
.
registerModule
(
"IconModule"
,
function
()
{
var
minder
=
this
;
var
renderPriorityIcon
=
function
(
node
,
val
)
{
var
renderPriorityIcon
=
function
(
node
,
val
)
{
var
colors
=
[
""
,
"#A92E24"
,
"#29A6BD"
,
"#1E8D54"
,
"#eb6100"
,
"#876DDA"
];
var
colors
=
[
""
,
"#A92E24"
,
"#29A6BD"
,
"#1E8D54"
,
"#eb6100"
,
"#876DDA"
];
var
_bg
=
new
kity
.
Rect
().
fill
(
colors
[
val
]
).
setRadius
(
3
).
setWidth
(
20
).
setHeight
(
20
);
var
_bg
=
new
kity
.
Rect
().
fill
(
colors
[
val
]
).
setRadius
(
3
).
setWidth
(
20
).
setHeight
(
20
);
...
@@ -45,8 +46,9 @@ KityMinder.registerModule( "IconModule", function () {
...
@@ -45,8 +46,9 @@ KityMinder.registerModule( "IconModule", function () {
if
(
val
<
5
)
d
.
close
();
if
(
val
<
5
)
d
.
close
();
_percent
.
fill
(
"#29A6BD"
);
_percent
.
fill
(
"#29A6BD"
);
var
pre
=
node
.
getData
(
"PriorityIcon"
);
var
pre
=
node
.
getData
(
"PriorityIcon"
);
if
(
!
pre
)
_rc
.
setTranslate
(
_contRc
.
getWidth
()
-
_rc
.
getWidth
()
/
2
,
0
);
var
style
=
minder
.
getCurrentLayoutStyle
()[
node
.
getType
()
];
else
_rc
.
setTranslate
(
_contRc
.
getWidth
()
+
_rc
.
getWidth
()
/
2
,
0
);
if
(
!
pre
)
_rc
.
setTranslate
(
_rc
.
getWidth
()
/
2
,
0
);
else
_rc
.
setTranslate
(
_contRc
.
getWidth
()
+
style
.
spaceLeft
,
0
);
};
};
var
setPriorityCommand
=
kity
.
createClass
(
"SetPriorityCommand"
,
(
function
()
{
var
setPriorityCommand
=
kity
.
createClass
(
"SetPriorityCommand"
,
(
function
()
{
return
{
return
{
...
...
src/module/layout.default.js
View file @
744c5568
...
@@ -84,7 +84,11 @@ KityMinder.registerModule( "LayoutDefault", function () {
...
@@ -84,7 +84,11 @@ KityMinder.registerModule( "LayoutDefault", function () {
padding
:
[
15.5
,
25.5
,
15.5
,
25.5
],
padding
:
[
15.5
,
25.5
,
15.5
,
25.5
],
margin
:
[
0
,
0
,
0
,
0
],
margin
:
[
0
,
0
,
0
,
0
],
radius
:
30
,
radius
:
30
,
highlight
:
'rgb(254, 219, 0)'
highlight
:
'rgb(254, 219, 0)'
,
spaceLeft
:
3
,
spaceRight
:
0
,
spaceTop
:
3
,
spaceBottom
:
3
},
},
"main"
:
{
"main"
:
{
stroke
:
new
kity
.
Pen
(
"white"
,
2
).
setLineCap
(
"round"
).
setLineJoin
(
"round"
),
stroke
:
new
kity
.
Pen
(
"white"
,
2
).
setLineCap
(
"round"
).
setLineJoin
(
"round"
),
...
@@ -94,7 +98,12 @@ KityMinder.registerModule( "LayoutDefault", function () {
...
@@ -94,7 +98,12 @@ KityMinder.registerModule( "LayoutDefault", function () {
fontSize
:
16
,
fontSize
:
16
,
margin
:
[
0
,
10
,
30
,
50
],
margin
:
[
0
,
10
,
30
,
50
],
radius
:
10
,
radius
:
10
,
highlight
:
'rgb(254, 219, 0)'
highlight
:
'rgb(254, 219, 0)'
,
spaceLeft
:
5
,
spaceRight
:
0
,
spaceTop
:
2
,
spaceBottom
:
2
},
},
"sub"
:
{
"sub"
:
{
stroke
:
new
kity
.
Pen
(
"white"
,
2
).
setLineCap
(
"round"
).
setLineJoin
(
"round"
),
stroke
:
new
kity
.
Pen
(
"white"
,
2
).
setLineCap
(
"round"
).
setLineJoin
(
"round"
),
...
@@ -102,7 +111,11 @@ KityMinder.registerModule( "LayoutDefault", function () {
...
@@ -102,7 +111,11 @@ KityMinder.registerModule( "LayoutDefault", function () {
fontSize
:
12
,
fontSize
:
12
,
margin
:
[
0
,
10
,
20
,
6
],
margin
:
[
0
,
10
,
20
,
6
],
padding
:
[
5
,
10
,
5.5
,
10
],
padding
:
[
5
,
10
,
5.5
,
10
],
highlight
:
'rgb(254, 219, 0)'
highlight
:
'rgb(254, 219, 0)'
,
spaceLeft
:
4
,
spaceRight
:
0
,
spaceTop
:
2
,
spaceBottom
:
2
}
}
};
};
//更新背景
//更新背景
...
...
src/module/nodetext.js
View file @
744c5568
...
@@ -10,7 +10,7 @@ KityMinder.registerModule( "NodeText", function () {
...
@@ -10,7 +10,7 @@ KityMinder.registerModule( "NodeText", function () {
var
style
=
this
.
getCurrentLayoutStyle
()[
node
.
getType
()
];
var
style
=
this
.
getCurrentLayoutStyle
()[
node
.
getType
()
];
textShape
.
fill
(
style
.
color
).
setSize
(
style
.
fontSize
);
textShape
.
fill
(
style
.
color
).
setSize
(
style
.
fontSize
);
textShape
.
setTranslate
(
width
,
0
);
textShape
.
setTranslate
(
width
,
0
);
textShape
.
setVerticalAlign
(
'middle'
);
textShape
.
setVerticalAlign
(
'middle'
);
}
}
}
}
}
}
...
...
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