Commit e02ca71e authored by campaign's avatar campaign

by zhanyi

parent 58871414
KM.registerToolbarUI( 'layoutstyle fontfamily fontsize', function ( name ) { KM.registerToolbarUI( 'fontfamily fontsize', function ( name ) {
var me = this, var me = this,
label = me.getLang( 'tooltips.' + name ), label = me.getLang( 'tooltips.' + name ),
...@@ -19,9 +19,7 @@ KM.registerToolbarUI( 'layoutstyle fontfamily fontsize', function ( name ) { ...@@ -19,9 +19,7 @@ KM.registerToolbarUI( 'layoutstyle fontfamily fontsize', function ( name ) {
} }
switch ( name ) { switch ( name ) {
case 'layoutstyle':
options = transForLayoutstyle( options );
break;
case 'fontfamily': case 'fontfamily':
options = transForFontfamily( options ); options = transForFontfamily( options );
...@@ -62,24 +60,6 @@ KM.registerToolbarUI( 'layoutstyle fontfamily fontsize', function ( name ) { ...@@ -62,24 +60,6 @@ KM.registerToolbarUI( 'layoutstyle fontfamily fontsize', function ( name ) {
return comboboxWidget.button().addClass( 'kmui-combobox' ); return comboboxWidget.button().addClass( 'kmui-combobox' );
function transForLayoutstyle( options ) {
var tempItems = [];
utils.each( options.items, function ( k, v ) {
options.value.push( k );
tempItems.push( k );
options.autowidthitem.push( $.wordCountAdaptive( tempItems[ tempItems.length - 1 ] ) );
} );
options.items = tempItems;
return options;
}
//字体参数转换 //字体参数转换
function transForFontfamily( options ) { function transForFontfamily( options ) {
......
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