InputPort.js
Summary
No overview generated for 'InputPort.js'
draw2d.InputPort=function( uiRepresentation)
{
draw2d.Port.call(this, uiRepresentation);
}
draw2d.InputPort.prototype = new draw2d.Port;
draw2d.InputPort.prototype.type="InputPort";
draw2d.InputPort.prototype.onDrop = function( port)
{
if(port.getMaxFanOut && port.getMaxFanOut()<= port.getFanOut())
return;
if(this.parentNode.id == port.parentNode.id)
{
}
else if(port instanceof draw2d.OutputPort)
{
var command = new draw2d.CommandConnect(this.parentNode.workflow,port,this);
this.parentNode.workflow.getCommandStack().execute(command);
}
}
draw2d.InputPort.prototype.onDragEnter = function( port)
{
if(port instanceof draw2d.OutputPort)
{
draw2d.Port.prototype.onDragEnter.call(this, port);
}
else if (port instanceof draw2d.LineStartResizeHandle)
{
var line = this.workflow.currentSelection;
if(line instanceof draw2d.Connection && line.getSource() instanceof draw2d.InputPort)
draw2d.Port.prototype.onDragEnter.call(this, line.getSource());
}
else if (port instanceof draw2d.LineEndResizeHandle)
{
var line = this.workflow.currentSelection;
if(line instanceof draw2d.Connection && line.getTarget() instanceof draw2d.InputPort)
draw2d.Port.prototype.onDragEnter.call(this, line.getTarget());
}
}
draw2d.InputPort.prototype.onDragLeave = function( port)
{
if(port instanceof draw2d.OutputPort)
{
draw2d.Port.prototype.onDragLeave.call(this, port);
}
else if (port instanceof draw2d.LineStartResizeHandle)
{
var line = this.workflow.currentSelection;
if(line instanceof draw2d.Connection && line.getSource() instanceof draw2d.InputPort)
draw2d.Port.prototype.onDragLeave.call(this, line.getSource());
}
else if (port instanceof draw2d.LineEndResizeHandle)
{
var line = this.workflow.currentSelection;
if(line instanceof draw2d.Connection && line.getTarget() instanceof draw2d.InputPort)
draw2d.Port.prototype.onDragLeave.call(this, line.getTarget());
}
}
Documentation generated by
JSDoc on Thu Feb 7 23:45:47 2008