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

View File

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