adding names to different route types

This commit is contained in:
Fernando Ontiveros
2011-03-01 00:34:12 +00:00
parent 078631375d
commit ac1bd9d351
2 changed files with 15 additions and 10 deletions

View File

@@ -151,19 +151,23 @@ MyWorkflow.prototype.connectionContextMenu=function(oShape)
this.canvasEvent = Ext.get(oShape.id);
this.contextEventmenu = new Ext.menu.Menu({
items: [{
text: 'Manhatten Router',
text: 'Straight Line',
iconCls: 'button_menu_ext ss_sprite ss_bullet_white ',
scope: this,
handler: MyWorkflow.prototype.toggleConnection
}, {
text: 'Bezier Router',
text: 'Curvy Line',
scope: this,
iconCls: 'button_menu_ext ss_sprite ss_vector',
handler: MyWorkflow.prototype.toggleConnection
}, {
text: 'Fan Router',
text: 'Angled Line',
scope: this,
iconCls: 'button_menu_ext ss_sprite ss_bullet_white ',
handler: MyWorkflow.prototype.toggleConnection
}, {
text: 'Delete Router',
text: 'Delete Line',
iconCls: 'button_menu_ext ss_sprite ss_delete',
scope: this,
handler:function()
{
@@ -186,20 +190,21 @@ MyWorkflow.prototype.connectionContextMenu=function(oShape)
MyWorkflow.prototype.toggleConnection=function(oShape)
{
this.currentSelection.workflow.contextClicked = false;
switch (oShape.text) {
switch ( strtolower(oShape.text)) {
case 'NULL Router':
this.currentSelection.setRouter(null);
break;
case 'Manhatten Router':
case 'angled line':
this.currentSelection.setRouter(new ManhattanConnectionRouter());
break;
case 'Bezier Router':
case 'curvy line':
this.currentSelection.setRouter(new BezierConnectionRouter());
break;
case 'Fan Router':
case 'straight line':
this.currentSelection.setRouter(new FanConnectionRouter());
break;
case 'Delete Router':
case 'delete line':
this.currentSelection.workflow.getCommandStack().execute(new CommandDelete(this.currentSelection.workflow.getCurrentSelection()));
ToolGeneric.prototype.execute.call(this);
break;

View File

@@ -3223,7 +3223,7 @@ ProcessOptions.prototype.addTriggers = function()
id: 'btnProperty',
text: _('ID_PROPERTIES'),
iconCls: 'button_menu_ext ss_sprite ss_application_edit',
handler: editProperties
handler: editProperties
});
var triggerStore = new Ext.data.GroupingStore({