Commit 49bba4e6 authored by campaign's avatar campaign

修改渲染方式

parent 0cd57fa1
...@@ -26,19 +26,20 @@ ...@@ -26,19 +26,20 @@
,'module/layout.default.js' ,'module/layout.default.js'
,'module/layout.bottom.js' ,'module/layout.bottom.js'
,'core/minder.select.js' ,'core/minder.select.js'
,'module/view.js' // ,'module/view.js'
,'module/dragtree.js' // ,'module/dragtree.js'
,'module/dropfile.js' // ,'module/dropfile.js'
,'module/keyboard.js' // ,'module/keyboard.js'
,'module/select.js' ,'module/select.js'
,'module/history.js' // ,'module/history.js'
,'module/editor.js' ,'module/editor.js'
,'module/editor.range.js' ,'module/editor.range.js'
,'module/editor.receiver.js' ,'module/editor.receiver.js'
,'module/editor.selection.js' ,'module/editor.selection.js'
,'module/basestyle.js' // ,'module/basestyle.js'
,'module/font.js' // ,'module/font.js'
,'module/zoom.js' // ,'module/zoom.js'
,'module/nodetext.js'
,'ui/jquery-ui-1.10.4.custom.min.js' ,'ui/jquery-ui-1.10.4.custom.min.js'
,'ui/widget.js' ,'ui/widget.js'
,'ui/button.js' ,'ui/button.js'
......
KityMinder.registerModule( "NodeText", function () {
var km = this;
return {
events:{
'renderNodeCenter':function(e){
var node = e.node;
if(node.getType() == 'root')
debugger
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)
}
}
}
} );
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment