MyOutputPort.js 867 B

1234567891011121314151617181920212223242526
  1. draw2d.MyOutputPort=function(_4aff){
  2. draw2d.OutputPort.call(this,_4aff);
  3. };
  4. draw2d.MyOutputPort.prototype=new draw2d.OutputPort();
  5. draw2d.MyOutputPort.prototype.type="MyOutputPort";
  6. draw2d.MyOutputPort.prototype.setWorkflow=function(workflow){
  7. draw2d.OutputPort.prototype.setWorkflow.call(this,workflow);
  8. };
  9. draw2d.MyOutputPort.prototype.onDrop=function(port){
  10. if(this.getMaxFanOut()<=this.getFanOut()){
  11. return;
  12. }
  13. if(this.parentNode.id==port.parentNode.id){
  14. }else{
  15. var _4b01=new draw2d.CommandConnect(this.parentNode.workflow,this,port);
  16. var connection = new draw2d.DecoratedConnection();
  17. var id = "flow"+Sequence.create();
  18. connection.id=id;
  19. connection.lineId=id;
  20. //connection.lineName=id;
  21. //connection.setLabel(id);
  22. //connection.setId(id);
  23. _4b01.setConnection(connection);
  24. this.parentNode.workflow.getCommandStack().execute(_4b01);
  25. }
  26. };