Commit d66345b0 authored by techird's avatar techird

ui optimize

parent b5cbafb8
...@@ -77,23 +77,23 @@ KityMinder.registerModule( "LayoutDefault", function () { ...@@ -77,23 +77,23 @@ KityMinder.registerModule( "LayoutDefault", function () {
//样式的配置(包括颜色、字号等) //样式的配置(包括颜色、字号等)
var nodeStyles = { var nodeStyles = {
"root": { "root": {
color: kity.Color.createHSL( 200, 50, 30 ), color: '#000',
fill: kity.Color.createHSL( 200, 30, 80 ), fill: '#e9df98',
fontSize: 20, fontSize: 24,
padding: [ 10.5, 10.5, 10.5, 10.5 ], padding: [ 15.5, 25.5, 15.5, 25.5 ],
margin: [ 0, 0, 0, 0 ], margin: [ 0, 0, 0, 0 ],
radius: 20, radius: 30,
highlight: "lightgreen" highlight: 'rgb(254, 219, 0)'
}, },
"main": { "main": {
stroke: new kity.Pen( "white", 2 ).setLineCap( "round" ).setLineJoin( "round" ), stroke: new kity.Pen( "white", 2 ).setLineCap( "round" ).setLineJoin( "round" ),
fill: "white", fill: '#A4c5c0',
color: "#333", color: "#333",
padding: [ 10.5, 20, 10.5, 20 ], padding: [ 6.5, 20, 6.5, 20 ],
fontSize: 16, fontSize: 16,
margin: [ 0, 10, 30, 50 ], margin: [ 0, 10, 30, 50 ],
radius: 10, radius: 10,
highlight: "yellow" highlight: 'rgb(254, 219, 0)'
}, },
"sub": { "sub": {
stroke: new kity.Pen( "white", 2 ).setLineCap( "round" ).setLineJoin( "round" ), stroke: new kity.Pen( "white", 2 ).setLineCap( "round" ).setLineJoin( "round" ),
...@@ -101,7 +101,7 @@ KityMinder.registerModule( "LayoutDefault", function () { ...@@ -101,7 +101,7 @@ KityMinder.registerModule( "LayoutDefault", function () {
fontSize: 12, fontSize: 12,
margin: [ 0, 10, 20, 6 ], margin: [ 0, 10, 20, 6 ],
padding: [ 5, 10, 5.5, 10 ], padding: [ 5, 10, 5.5, 10 ],
highlight: kity.Color.createHSL( 200, 50, 60 ) highlight: 'rgb(254, 219, 0)'
} }
}; };
//更新背景 //更新背景
...@@ -393,8 +393,10 @@ KityMinder.registerModule( "LayoutDefault", function () { ...@@ -393,8 +393,10 @@ KityMinder.registerModule( "LayoutDefault", function () {
case "sub": case "sub":
if ( highlight ) { if ( highlight ) {
Layout.highlightshape.fill( nodeStyle.highlight ).setOpacity( 1 ); Layout.highlightshape.fill( nodeStyle.highlight ).setOpacity( 1 );
node.getTextShape().fill( 'black' );
} else { } else {
Layout.highlightshape.setOpacity( 0 ); Layout.highlightshape.setOpacity( 0 );
node.getTextShape().fill( 'white' );
} }
break; break;
default: default:
......
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