Commit 7e201ace authored by campaign's avatar campaign

by zhanyi

parent a30376a7
...@@ -13,11 +13,13 @@ KityMinder.registerModule( "basestylemodule", function () { ...@@ -13,11 +13,13 @@ KityMinder.registerModule( "basestylemodule", function () {
utils.each(nodes,function(i,n){ utils.each(nodes,function(i,n){
n.setData('bold'); n.setData('bold');
n.getTextShape().setAttr('font-weight'); n.getTextShape().setAttr('font-weight');
km.updateLayout(n)
}) })
}else{ }else{
utils.each(nodes,function(i,n){ utils.each(nodes,function(i,n){
n.setData('bold',true); n.setData('bold',true);
n.getTextShape().setAttr('font-weight','bold'); n.getTextShape().setAttr('font-weight','bold');
km.updateLayout(n)
}) })
} }
}, },
...@@ -43,11 +45,13 @@ KityMinder.registerModule( "basestylemodule", function () { ...@@ -43,11 +45,13 @@ KityMinder.registerModule( "basestylemodule", function () {
utils.each(nodes,function(i,n){ utils.each(nodes,function(i,n){
n.setData('italic'); n.setData('italic');
n.getTextShape().setAttr('font-style'); n.getTextShape().setAttr('font-style');
km.updateLayout(n)
}) })
}else{ }else{
utils.each(nodes,function(i,n){ utils.each(nodes,function(i,n){
n.setData('italic',true); n.setData('italic',true);
n.getTextShape().setAttr('font-style','italic'); n.getTextShape().setAttr('font-style','italic');
km.updateLayout(n)
}) })
} }
}, },
......
...@@ -88,7 +88,6 @@ Minder.Receiver = kity.createClass('Receiver',{ ...@@ -88,7 +88,6 @@ Minder.Receiver = kity.createClass('Receiver',{
this.textShape.setContent(text); this.textShape.setContent(text);
this.setContainerStyle(); this.setContainerStyle();
this.minderNode.setText(text); this.minderNode.setText(text);
this.km.renderNode(this.minderNode);
this.km.updateLayout(this.minderNode); this.km.updateLayout(this.minderNode);
this.setBaseOffset(); this.setBaseOffset();
this.updateTextData(); this.updateTextData();
......
...@@ -39,6 +39,7 @@ KityMinder.registerModule( "fontmodule", function () { ...@@ -39,6 +39,7 @@ KityMinder.registerModule( "fontmodule", function () {
utils.each( nodes, function ( i, n ) { utils.each( nodes, function ( i, n ) {
n.setData( 'fontfamily', family ); n.setData( 'fontfamily', family );
n.getTextShape().setAttr( 'font-family', family ); n.getTextShape().setAttr( 'font-family', family );
km.updateLayout(n)
} ) } )
} }
} ), } ),
...@@ -50,6 +51,7 @@ KityMinder.registerModule( "fontmodule", function () { ...@@ -50,6 +51,7 @@ KityMinder.registerModule( "fontmodule", function () {
utils.each( nodes, function ( i, n ) { utils.each( nodes, function ( i, n ) {
n.setData( 'fontsize', size ); n.setData( 'fontsize', size );
n.getTextShape().setSize(size); n.getTextShape().setSize(size);
km.updateLayout(n)
} ) } )
} }
} ) } )
......
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