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
4fdb9851
Commit
4fdb9851
authored
Apr 23, 2014
by
Akikonata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clear
parent
389009a5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
17 deletions
+27
-17
layout.bottom.js
src/module/layout.bottom.js
+18
-2
layout.default.js
src/module/layout.default.js
+2
-7
nodetext.js
src/module/nodetext.js
+7
-8
No files found.
src/module/layout.bottom.js
View file @
4fdb9851
...
...
@@ -353,7 +353,7 @@ KityMinder.registerModule( "LayoutBottom", function () {
}
},
updateLayout
:
function
(
node
)
{
node
.
get
RenderContainer
().
clear
();
node
.
get
ContRc
().
clear
();
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeLeft"
,
{
node
:
node
},
false
)
);
...
...
@@ -390,7 +390,23 @@ KityMinder.registerModule( "LayoutBottom", function () {
_root
.
getLayout
().
align
=
"center"
;
updateBg
(
_root
);
initLayout
(
_root
);
this
.
updateLayout
(
_root
);
_root
.
getContRc
().
clear
();
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeLeft"
,
{
node
:
_root
},
false
)
);
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeCenter"
,
{
node
:
_root
},
false
)
);
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeRight"
,
{
node
:
_root
},
false
)
);
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeBottom"
,
{
node
:
_root
},
false
)
);
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeTop"
,
{
node
:
_root
},
false
)
);
updateShapeByCont
(
_root
);
updateLayoutAll
(
_root
);
translateNode
(
_root
);
var
_buffer
=
[
_root
];
...
...
src/module/layout.default.js
View file @
4fdb9851
...
...
@@ -440,7 +440,7 @@ KityMinder.registerModule( "LayoutDefault", function () {
}
},
updateLayout
:
function
(
node
)
{
node
.
getRenderContainer
().
clear
();
node
.
getContRc
().
clear
();
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeLeft"
,
{
node
:
node
},
false
)
);
...
...
@@ -475,12 +475,7 @@ KityMinder.registerModule( "LayoutDefault", function () {
_root
.
getLayout
().
align
=
"center"
;
updateBg
(
_root
);
initLayout
(
_root
);
// this._fire( new MinderEvent( "beforeRenderNode", {
// node: _root
// }, false ) );
// this._fire( new MinderEvent( "RenderNode", {
// node: _root
// }, false ) );
_root
.
getContRc
().
clear
();
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeLeft"
,
{
node
:
_root
},
false
)
);
...
...
src/module/nodetext.js
View file @
4fdb9851
KityMinder
.
registerModule
(
"NodeText"
,
function
()
{
var
km
=
this
;
return
{
events
:{
'renderNodeCenter'
:
function
(
e
)
{
events
:
{
'renderNodeCenter'
:
function
(
e
)
{
var
node
=
e
.
node
;
if
(
node
.
getType
()
==
'root'
)
debugger
if
(
node
.
getType
()
==
'root'
)
var
width
=
node
.
getContRc
().
getWidth
();
var
textShape
=
new
kity
.
Text
(
node
.
getData
(
'text'
)
||
''
);
textShape
.
setAttr
(
'_nodeTextShape'
,
true
);
node
.
getContRc
().
appendShape
(
textShape
);
var
style
=
this
.
getCurrentLayoutStyle
()[
node
.
getType
()
];
textShape
.
fill
(
style
.
color
).
setSize
(
style
.
fontSize
);
textShape
.
setPosition
(
width
,
textShape
.
getHeight
()
*
.
75
)
var
style
=
this
.
getCurrentLayoutStyle
()[
node
.
getType
()
];
textShape
.
fill
(
style
.
color
).
setSize
(
style
.
fontSize
);
textShape
.
setPosition
(
width
,
textShape
.
getHeight
()
*
.
75
)
}
}
}
...
...
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