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
e10988fa
Commit
e10988fa
authored
May 17, 2014
by
Akikonata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
layout
parent
60602081
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
27 deletions
+39
-27
layout.bottom.js
src/module/layout.bottom.js
+39
-27
No files found.
src/module/layout.bottom.js
View file @
e10988fa
...
@@ -73,7 +73,11 @@ KityMinder.registerModule("LayoutBottom", function () {
...
@@ -73,7 +73,11 @@ KityMinder.registerModule("LayoutBottom", function () {
padding
:
[
15.5
,
25.5
,
15.5
,
25.5
],
padding
:
[
15.5
,
25.5
,
15.5
,
25.5
],
margin
:
[
0
,
0
,
20
,
0
],
margin
:
[
0
,
0
,
20
,
0
],
radius
:
0
,
radius
:
0
,
highlight
:
'rgb(254, 219, 0)'
highlight
:
'rgb(254, 219, 0)'
,
spaceLeft
:
3
,
spaceRight
:
0
,
spaceTop
:
3
,
spaceBottom
:
10
},
},
"main"
:
{
"main"
:
{
stroke
:
new
kity
.
Pen
(
"white"
,
2
).
setLineCap
(
"round"
).
setLineJoin
(
"round"
),
stroke
:
new
kity
.
Pen
(
"white"
,
2
).
setLineCap
(
"round"
).
setLineJoin
(
"round"
),
...
@@ -83,7 +87,11 @@ KityMinder.registerModule("LayoutBottom", function () {
...
@@ -83,7 +87,11 @@ KityMinder.registerModule("LayoutBottom", function () {
fontSize
:
16
,
fontSize
:
16
,
margin
:
[
20
,
20
,
10
,
10
],
margin
:
[
20
,
20
,
10
,
10
],
radius
:
0
,
radius
:
0
,
highlight
:
'rgb(254, 219, 0)'
highlight
:
'rgb(254, 219, 0)'
,
spaceLeft
:
3
,
spaceRight
:
0
,
spaceTop
:
3
,
spaceBottom
:
10
},
},
"sub"
:
{
"sub"
:
{
stroke
:
new
kity
.
Pen
(
"white"
,
2
).
setLineCap
(
"round"
).
setLineJoin
(
"round"
),
stroke
:
new
kity
.
Pen
(
"white"
,
2
).
setLineCap
(
"round"
).
setLineJoin
(
"round"
),
...
@@ -92,7 +100,11 @@ KityMinder.registerModule("LayoutBottom", function () {
...
@@ -92,7 +100,11 @@ KityMinder.registerModule("LayoutBottom", function () {
margin
:
[
10
,
10
,
10
,
30
],
margin
:
[
10
,
10
,
10
,
30
],
padding
:
[
5
,
10
,
5.5
,
10
],
padding
:
[
5
,
10
,
5.5
,
10
],
highlight
:
'rgb(254, 219, 0)'
,
highlight
:
'rgb(254, 219, 0)'
,
fill
:
'rgb(231, 243, 255)'
fill
:
'rgb(231, 243, 255)'
,
spaceLeft
:
3
,
spaceRight
:
0
,
spaceTop
:
3
,
spaceBottom
:
10
}
}
};
};
//更新背景
//更新背景
...
@@ -154,7 +166,10 @@ KityMinder.registerModule("LayoutBottom", function () {
...
@@ -154,7 +166,10 @@ KityMinder.registerModule("LayoutBottom", function () {
default
:
default
:
break
;
break
;
}
}
contRc
.
setTranslate
(
nodeStyle
.
padding
[
3
],
nodeStyle
.
padding
[
0
]
+
_contRCHeight
/
2
);
var
rBox
=
contRc
.
getRenderBox
();
// Todo:很坑的改法,不知为何就对了,需要处理
contRc
.
setTranslate
(
nodeStyle
.
padding
[
3
],
0
);
contRc
.
translate
(
0
,
nodeStyle
.
padding
[
0
]
-
rBox
.
top
);
};
};
var
updateLayoutMain
=
function
()
{
var
updateLayoutMain
=
function
()
{
var
_root
=
minder
.
getRoot
();
var
_root
=
minder
.
getRoot
();
...
@@ -369,6 +384,9 @@ KityMinder.registerModule("LayoutBottom", function () {
...
@@ -369,6 +384,9 @@ KityMinder.registerModule("LayoutBottom", function () {
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeTop"
,
{
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeTop"
,
{
node
:
node
node
:
node
},
false
));
},
false
));
this
.
_firePharse
(
new
MinderEvent
(
"RenderNode"
,
{
node
:
_root
},
false
));
updateShapeByCont
(
node
);
updateShapeByCont
(
node
);
var
set
=
updateLayoutAll
(
node
,
node
.
getParent
(),
"change"
);
var
set
=
updateLayoutAll
(
node
,
node
.
getParent
(),
"change"
);
for
(
var
i
=
0
;
i
<
set
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
set
.
length
;
i
++
)
{
...
@@ -394,24 +412,24 @@ KityMinder.registerModule("LayoutBottom", function () {
...
@@ -394,24 +412,24 @@ KityMinder.registerModule("LayoutBottom", function () {
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeLeft"
,
{
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeLeft"
,
{
node
:
_root
node
:
_root
},
false
));
},
false
));
//
this._firePharse(new MinderEvent("RenderNodeCenter", {
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeCenter"
,
{
//
node: _root
node
:
_root
//
}, false));
},
false
));
//
this._firePharse(new MinderEvent("RenderNodeRight", {
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeRight"
,
{
//
node: _root
node
:
_root
//
}, false));
},
false
));
//
this._firePharse(new MinderEvent("RenderNodeBottom", {
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeBottom"
,
{
//
node: _root
node
:
_root
//
}, false));
},
false
));
//
this._firePharse(new MinderEvent("RenderNodeTop", {
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeTop"
,
{
//
node: _root
node
:
_root
//
}, false));
},
false
));
//
this._firePharse(new MinderEvent("RenderNode", {
this
.
_firePharse
(
new
MinderEvent
(
"RenderNode"
,
{
//
node: _root
node
:
_root
//
}, false));
},
false
));
//
updateShapeByCont(_root);
updateShapeByCont
(
_root
);
// updateLayoutAll(_root);
// updateLayoutAll(_root);
//
translateNode(_root);
translateNode
(
_root
);
// var _buffer = [_root];
// var _buffer = [_root];
// var _cleanbuffer = [];
// var _cleanbuffer = [];
//打散结构
//打散结构
...
@@ -453,12 +471,6 @@ KityMinder.registerModule("LayoutBottom", function () {
...
@@ -453,12 +471,6 @@ KityMinder.registerModule("LayoutBottom", function () {
//计算位置等流程
//计算位置等流程
updateBg
(
node
);
updateBg
(
node
);
initLayout
(
node
);
initLayout
(
node
);
// this._fire( new MinderEvent( "beforeRenderNode", {
// node: node
// }, false ) );
// this._fire( new MinderEvent( "RenderNode", {
// node: node
// }, false ) );
node
.
getRenderContainer
().
clear
();
node
.
getRenderContainer
().
clear
();
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeLeft"
,
{
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeLeft"
,
{
node
:
node
node
:
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