Commit 74a372ea authored by campaign's avatar campaign

向下布局

parent ac8c0a2a
......@@ -31,7 +31,7 @@ KM.registerUI( 'contextmenu', function () {
var node = e.getTargetNode();
if(node){
this.removeAllSelectedNodes();
this.select(node)
this.select(node);
}
......
......@@ -48,19 +48,19 @@ KM.registerToolbarUI('switchlayout', function (name) {
});
var data = [];
utils.each(me.getLayoutStyleItems(), function (i, v) {
data.push({
label: me.getLang('tooltips.' + name) + ' ' + v,
cmdName: 'switchlayout',
exec: function () {
me.execCommand('switchlayout', v);
}
})
});
data.push({
divider: 1
});
me.addContextmenu(data);
// var data = [];
// utils.each(me.getLayoutStyleItems(), function (i, v) {
// data.push({
// label: me.getLang('tooltips.' + name) + ' ' + v,
// cmdName: 'switchlayout',
// exec: function () {
// me.execCommand('switchlayout', v);
// }
// });
// });
// data.push({
// divider: 1
// });
// me.addContextmenu(data);
return comboboxWidget.button().addClass('kmui-combobox');
});
\ No newline at end of file
......@@ -283,7 +283,21 @@ KityMinder.registerModule("LayoutModule", function () {
cmdName: 'removenode'
}, {
divider: 1
}
},{
label: this.getLang('layout.default'),
exec: function () {
this.execCommand('switchlayout','default');
this.initStyle();
},
cmdName: 'switchlayout'
},{
label: this.getLang('layout.bottom'),
exec: function () {
this.execCommand('switchlayout', 'bottom');
this.initStyle();
},
cmdName: 'switchlayout'
}
],
"defaultOptions": {
......
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