Commit c081cbda authored by Akikonata's avatar Akikonata

fixed bug

parent f050e1e0
......@@ -8,8 +8,7 @@ KM.registerToolbarUI( 'layout', function ( name ) {
items: me.getLayoutStyleItems() || [],
itemStyles: [],
value: me.getLayoutStyleItems(),
autowidthitem: [],
enabledRecord: false
autowidthitem: []
},
$combox = null;
if ( options.items.length == 0 ) {
......@@ -27,6 +26,14 @@ KM.registerToolbarUI( 'layout', function ( name ) {
$combox.appendTo( me.$container.find( '.kmui-dialog-container' ) );
}
} );
me.on( 'interactchange', function () {
var value = this.queryCommandValue( "switchlayout" );
if ( value ) {
//设置label
comboboxWidget.selectItemByLabel( value );
}
} );
return comboboxWidget.button().addClass( 'kmui-combobox' );
} );
\ No newline at end of file
......@@ -94,7 +94,10 @@ KityMinder.registerModule( "LayoutModule", function () {
var SwitchLayoutCommand = kity.createClass( "SwitchLayoutCommand", ( function () {
return {
base: Command,
execute: switchLayout
execute: switchLayout,
queryValue: function ( km ) {
return km.getCurrentStyle();
}
};
} )() );
var AppendChildNodeCommand = kity.createClass( "AppendChildNodeCommand", ( function () {
......
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