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
5b1484b6
Commit
5b1484b6
authored
Apr 23, 2014
by
Akikonata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed highlight extra code
parent
8b320fdf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
36 deletions
+20
-36
icon.js
src/module/icon.js
+20
-21
layout.default.js
src/module/layout.default.js
+0
-15
No files found.
src/module/icon.js
View file @
5b1484b6
...
...
@@ -91,27 +91,26 @@ KityMinder.registerModule( "IconModule", function () {
},
"events"
:
{
"RenderNodeLeft"
:
function
(
e
)
{
//alert( '111111' );
// var node = e.node;
// var iconRc = node.getIconRc();
// var contRc = node.getContRc();
// var PriorityIconVal = node.getData( "PriorityIcon" );
// var ProgressIconVal = node.getData( "ProgressIcon" );
// //依次排布图标、文字
// iconRc.clear();
// var PriorityIconWidth = 0;
// if ( PriorityIconVal ) {
// renderPriorityIcon( node, PriorityIconVal );
// PriorityIconWidth = 22;
// }
// if ( ProgressIconVal ) {
// renderProgressIcon( node, ProgressIconVal, PriorityIconWidth + 10 );
// }
// var iconWidth = iconRc.getWidth();
// var textShape = node.getTextShape();
// if ( iconWidth ) textShape.setTransform( new kity.Matrix().translate( iconWidth + 5, 0 ) );
// else textShape.setTransform( new kity.Matrix().translate( 0, 0 ) );
// iconRc.setTransform( new kity.Matrix().translate( 0, -( iconRc.getHeight() + textShape.getHeight() ) / 2 ) );
var
node
=
e
.
node
;
var
iconRc
=
new
kity
.
Group
();
var
contRc
=
node
.
getContRc
();
var
PriorityIconVal
=
node
.
getData
(
"PriorityIcon"
);
var
ProgressIconVal
=
node
.
getData
(
"ProgressIcon"
);
//依次排布图标、文字
//iconRc.clear();
var
PriorityIconWidth
=
0
;
if
(
PriorityIconVal
)
{
renderPriorityIcon
(
node
,
PriorityIconVal
);
PriorityIconWidth
=
22
;
}
if
(
ProgressIconVal
)
{
renderProgressIcon
(
node
,
ProgressIconVal
,
PriorityIconWidth
+
10
);
}
var
iconWidth
=
iconRc
.
getWidth
();
//var textShape = node.getTextShape();
//if ( iconWidth ) textShape.setTransform( new kity.Matrix().translate( iconWidth + 5, 0 ) );
//else textShape.setTransform( new kity.Matrix().translate( 0, 0 ) );
iconRc
.
setTransform
(
new
kity
.
Matrix
().
translate
(
0
,
-
(
iconRc
.
getHeight
()
+
textShape
.
getHeight
()
)
/
2
)
);
}
}
};
...
...
src/module/layout.default.js
View file @
5b1484b6
...
...
@@ -438,21 +438,6 @@ KityMinder.registerModule( "LayoutDefault", function () {
default
:
break
;
}
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeLeft"
,
{
node
:
node
},
false
)
);
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeCenter"
,
{
node
:
node
},
false
)
);
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeRight"
,
{
node
:
node
},
false
)
);
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeBottom"
,
{
node
:
node
},
false
)
);
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeTop"
,
{
node
:
node
},
false
)
);
},
updateLayout
:
function
(
node
)
{
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeLeft"
,
{
...
...
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