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
a69442eb
Commit
a69442eb
authored
Feb 19, 2014
by
techird
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
https://github.com/kitygraph/kityminder
into dev
parents
d7686c1d
e2ddc1f1
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
582 additions
and
347 deletions
+582
-347
layout.bottom.js
src/module/layout.bottom.js
+535
-315
layout.default.js
src/module/layout.default.js
+14
-4
layout.js
src/module/layout.js
+5
-1
dialogsize.css
themes/default/_css/dialogsize.css
+0
-27
import.css
themes/default/_css/import.css
+1
-0
markers.css
themes/default/_css/markers.css
+27
-0
No files found.
src/module/layout.bottom.js
View file @
a69442eb
This diff is collapsed.
Click to expand it.
src/module/layout.default.js
View file @
a69442eb
...
@@ -121,7 +121,7 @@ KityMinder.registerModule( "LayoutDefault", function () {
...
@@ -121,7 +121,7 @@ KityMinder.registerModule( "LayoutDefault", function () {
case
"sub"
:
case
"sub"
:
var
underline
=
Layout
.
underline
=
new
kity
.
Path
();
var
underline
=
Layout
.
underline
=
new
kity
.
Path
();
var
highlightshape
=
Layout
.
highlightshape
=
new
kity
.
Rect
().
setRadius
(
4
);
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
;
break
;
default
:
default
:
break
;
break
;
...
@@ -170,7 +170,7 @@ KityMinder.registerModule( "LayoutDefault", function () {
...
@@ -170,7 +170,7 @@ KityMinder.registerModule( "LayoutDefault", function () {
Layout
.
highlightshape
Layout
.
highlightshape
.
setWidth
(
_contWidth
+
nodeStyle
.
padding
[
1
]
+
nodeStyle
.
padding
[
3
]
)
.
setWidth
(
_contWidth
+
nodeStyle
.
padding
[
1
]
+
nodeStyle
.
padding
[
3
]
)
.
setHeight
(
_contHeight
+
nodeStyle
.
padding
[
0
]
+
nodeStyle
.
padding
[
2
]
);
.
setHeight
(
_contHeight
+
nodeStyle
.
padding
[
0
]
+
nodeStyle
.
padding
[
2
]
);
Layout
.
bgRect
.
setWidth
(
width
).
setHeight
(
height
);
Layout
.
bgRect
.
setWidth
(
width
).
setHeight
(
height
);
break
;
break
;
default
:
default
:
break
;
break
;
...
@@ -377,7 +377,7 @@ KityMinder.registerModule( "LayoutDefault", function () {
...
@@ -377,7 +377,7 @@ KityMinder.registerModule( "LayoutDefault", function () {
}
}
}
}
//更新收放icon
//更新收放icon
if
(
nodeType
!==
"root"
)
{
if
(
nodeType
!==
"root"
&&
node
.
getChildren
().
length
!==
0
)
{
if
(
!
Layout
.
shicon
)
{
if
(
!
Layout
.
shicon
)
{
Layout
.
shicon
=
new
ShIcon
(
node
);
Layout
.
shicon
=
new
ShIcon
(
node
);
}
}
...
@@ -475,6 +475,16 @@ KityMinder.registerModule( "LayoutDefault", function () {
...
@@ -475,6 +475,16 @@ KityMinder.registerModule( "LayoutDefault", function () {
Layout
.
align
=
siblingLayout
.
align
;
Layout
.
align
=
siblingLayout
.
align
;
parent
.
insertChild
(
node
,
sibling
.
getIndex
()
+
1
);
parent
.
insertChild
(
node
,
sibling
.
getIndex
()
+
1
);
if
(
parent
.
getType
()
===
"root"
)
{
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
sideList
=
parentLayout
[
Layout
.
appendside
+
"List"
];
var
idx
=
sideList
.
indexOf
(
sibling
);
var
idx
=
sideList
.
indexOf
(
sibling
);
sideList
.
splice
(
idx
+
1
,
0
,
node
);
sideList
.
splice
(
idx
+
1
,
0
,
node
);
...
@@ -600,7 +610,7 @@ KityMinder.registerModule( "LayoutDefault", function () {
...
@@ -600,7 +610,7 @@ KityMinder.registerModule( "LayoutDefault", function () {
}
else
{
}
else
{
_buffer
[
0
].
getRenderContainer
().
remove
();
_buffer
[
0
].
getRenderContainer
().
remove
();
Layout
.
connect
.
remove
();
Layout
.
connect
.
remove
();
Layout
.
shicon
.
remove
();
if
(
Layout
.
shicon
)
Layout
.
shicon
.
remove
();
}
}
_buffer
=
_buffer
.
concat
(
_buffer
[
0
].
getChildren
()
);
_buffer
=
_buffer
.
concat
(
_buffer
[
0
].
getChildren
()
);
_buffer
.
shift
();
_buffer
.
shift
();
...
...
src/module/layout.js
View file @
a69442eb
...
@@ -132,7 +132,11 @@ KityMinder.registerModule( "LayoutModule", function () {
...
@@ -132,7 +132,11 @@ KityMinder.registerModule( "LayoutModule", function () {
base
:
Command
,
base
:
Command
,
execute
:
function
(
km
)
{
execute
:
function
(
km
)
{
var
selectedNodes
=
km
.
getSelectedNodes
();
var
selectedNodes
=
km
.
getSelectedNodes
();
if
(
selectedNodes
.
length
===
0
)
return
false
;
var
_root
=
km
.
getRoot
();
if
(
selectedNodes
.
length
===
0
||
(
selectedNodes
.
length
===
1
&&
!
selectedNodes
[
0
].
getParent
()
)
)
{
km
.
select
(
_root
);
return
false
;
}
var
_buffer
=
[];
var
_buffer
=
[];
for
(
var
i
=
0
;
i
<
selectedNodes
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
selectedNodes
.
length
;
i
++
)
{
_buffer
.
push
(
selectedNodes
[
i
]
);
_buffer
.
push
(
selectedNodes
[
i
]
);
...
...
themes/default/_css/dialogsize.css
View file @
a69442eb
.kmui-modal-header
.kmui-title
{
font-size
:
14px
;
}
.kmui-dialog-markers-body
{
padding-bottom
:
5px
}
.icon-list
{
margin
:
0
;
padding
:
0
}
.icon-list
li
{
padding
:
5px
10px
;
margin
:
0
;
list-style
:
none
;
cursor
:
pointer
;
color
:
#333
}
.icon-list
li
:hover
,
.icon-list
li
.active
{
background
:
#cfe0f7
}
.icon-list
li
span
.icon
{
display
:
inline-block
;
width
:
20px
;
height
:
20px
;
vertical-align
:
middle
;
margin-right
:
10px
;
}
\ No newline at end of file
themes/default/_css/import.css
View file @
a69442eb
...
@@ -11,3 +11,4 @@
...
@@ -11,3 +11,4 @@
@import
"tooltip.css"
;
@import
"tooltip.css"
;
@import
"colorpicker.css"
;
@import
"colorpicker.css"
;
@import
"separator.css"
;
@import
"separator.css"
;
@import
"markers.css"
;
themes/default/_css/markers.css
0 → 100644
View file @
a69442eb
.kmui-modal-header
.kmui-title
{
font-size
:
14px
;
}
.kmui-dialog-markers-body
{
padding-bottom
:
5px
}
.icon-list
{
margin
:
0
;
padding
:
0
}
.icon-list
li
{
padding
:
5px
10px
;
margin
:
0
;
list-style
:
none
;
cursor
:
pointer
;
color
:
#333
}
.icon-list
li
:hover
,
.icon-list
li
.active
{
background
:
#cfe0f7
}
.icon-list
li
span
.icon
{
display
:
inline-block
;
width
:
20px
;
height
:
20px
;
vertical-align
:
middle
;
margin-right
:
10px
;
}
\ No newline at end of file
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