Commit 0a07428c authored by techird's avatar techird

refract

parent af572c11
This diff is collapsed.
...@@ -121,7 +121,7 @@ KityMinder.registerModule( "LayoutDefault", function () { ...@@ -121,7 +121,7 @@ KityMinder.registerModule( "LayoutDefault", function () {
case "sub": case "sub":
var underline = Layout.underline = new kity.Path(); var underline = Layout.underline = new kity.Path();
var highlightshape = Layout.highlightshape = new kity.Rect().setRadius( 4 ); var highlightshape = Layout.highlightshape = new kity.Rect().setRadius( 4 );
node.getBgRc().clear().addShapes( [ highlightshape, underline ] ); node.getBgRc().clear().addShapes( [ Layout.bgRect = new kity.Rect().setRadius(4), highlightshape, underline ] );
break; break;
default: default:
break; break;
...@@ -160,6 +160,8 @@ KityMinder.registerModule( "LayoutDefault", function () { ...@@ -160,6 +160,8 @@ KityMinder.registerModule( "LayoutDefault", function () {
case "sub": case "sub":
var _contWidth = contRc.getWidth(); var _contWidth = contRc.getWidth();
var _contHeight = contRc.getHeight(); var _contHeight = contRc.getHeight();
width = _contWidth + nodeStyle.padding[ 1 ] + nodeStyle.padding[ 3 ];
height = _contHeight + nodeStyle.padding[ 0 ] + nodeStyle.padding[ 2 ];
Layout.underline.getDrawer() Layout.underline.getDrawer()
.clear() .clear()
.moveTo( 0, _contHeight + nodeStyle.padding[ 2 ] + nodeStyle.padding[ 0 ] ) .moveTo( 0, _contHeight + nodeStyle.padding[ 2 ] + nodeStyle.padding[ 0 ] )
...@@ -168,6 +170,7 @@ KityMinder.registerModule( "LayoutDefault", function () { ...@@ -168,6 +170,7 @@ KityMinder.registerModule( "LayoutDefault", function () {
Layout.highlightshape Layout.highlightshape
.setWidth( _contWidth + nodeStyle.padding[ 1 ] + nodeStyle.padding[ 3 ] ) .setWidth( _contWidth + nodeStyle.padding[ 1 ] + nodeStyle.padding[ 3 ] )
.setHeight( _contHeight + nodeStyle.padding[ 0 ] + nodeStyle.padding[ 2 ] ); .setHeight( _contHeight + nodeStyle.padding[ 0 ] + nodeStyle.padding[ 2 ] );
Layout.bgRect.setWidth(width).setHeight(height);
break; break;
default: default:
break; break;
......
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