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
b7a9e947
Commit
b7a9e947
authored
Feb 07, 2014
by
Akikonata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added node event
parent
aeef6b0c
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
368 additions
and
5 deletions
+368
-5
dev.html
demo/dev.html
+1
-1
layout.default.js
src/module/layout.default.js
+7
-2
layout.green.js
src/module/layout.green.js
+358
-1
layout.js
src/module/layout.js
+2
-1
No files found.
demo/dev.html
View file @
b7a9e947
...
...
@@ -17,7 +17,7 @@
<div
id=
"kityminder"
style=
"height:1000px;width:100%"
onselectstart=
"return false"
>
<select
id=
"StyleChange"
>
<option
value=
"default"
>
Default
</option>
<option
value=
"green"
>
Green
</option>
<option
value=
"green"
selected
>
Green
</option>
</select>
</div>
</body>
...
...
src/module/layout.default.js
View file @
b7a9e947
...
...
@@ -430,7 +430,6 @@ KityMinder.registerModule( "LayoutDefault", function () {
drawNode
(
node
);
},
initStyle
:
function
()
{
minder
.
getRenderContainer
().
clear
();
//绘制root并且调整到正确位置
var
_root
=
this
.
getRoot
();
minder
.
handelNodeInsert
(
_root
);
...
...
@@ -483,6 +482,9 @@ KityMinder.registerModule( "LayoutDefault", function () {
}
var
parentLayout
=
parent
.
getData
(
"layout"
);
var
Layout
=
node
.
getData
(
"layout"
);
this
.
_fire
(
new
MinderEvent
(
"beforeRenderNode"
,
{
node
:
node
},
false
)
);
if
(
parent
.
getType
()
===
"root"
)
{
node
.
setType
(
"main"
);
var
leftList
=
parentLayout
.
leftList
;
...
...
@@ -511,6 +513,9 @@ KityMinder.registerModule( "LayoutDefault", function () {
Layout
.
appendside
=
parentLayout
.
appendside
;
childbranch
=
new
SubBranch
(
node
);
}
this
.
_fire
(
new
MinderEvent
(
"afterRenderNode"
,
{
node
:
node
},
false
)
);
var
set1
=
updateLayoutVertical
(
node
,
parent
,
"append"
);
var
set2
=
updateLayoutHorizon
(
node
);
var
set
=
uSet
(
set1
,
set2
);
...
...
@@ -543,7 +548,7 @@ KityMinder.registerModule( "LayoutDefault", function () {
while
(
_buffer
.
length
!==
0
)
{
_buffer
=
_buffer
.
concat
(
_buffer
[
0
].
getChildren
()
);
_buffer
[
0
].
getData
(
"layout"
).
shape
.
clear
();
_buffer
[
0
].
getRenderContainer
().
r
emove
();
_buffer
[
0
].
handelNodeR
emove
();
var
prt
=
_buffer
[
0
].
getParent
();
prt
.
removeChild
(
_buffer
[
0
]
);
_buffer
.
shift
();
...
...
src/module/layout.green.js
View file @
b7a9e947
This diff is collapsed.
Click to expand it.
src/module/layout.js
View file @
b7a9e947
...
...
@@ -73,6 +73,7 @@ KityMinder.registerModule( "LayoutModule", function () {
_root
.
preTraverse
(
function
(
n
)
{
n
.
clearLayout
();
n
.
setPoint
();
n
.
getRenderContainer
().
clear
();
}
);
km
.
setCurrentStyle
(
style
);
km
.
initStyle
();
...
...
@@ -151,7 +152,7 @@ KityMinder.registerModule( "LayoutModule", function () {
}
},
"defaultOptions"
:
{
"layoutstyle"
:
"
default
"
"layoutstyle"
:
"
green
"
}
};
}
);
\ 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