adding third port to gateways
This commit is contained in:
@@ -1,102 +1,104 @@
|
||||
bpmnGatewayComplex=function(width,_30ab){
|
||||
VectorFigure.call(this);
|
||||
//Setting width and height values as per the zoom ratio
|
||||
if(typeof workflow.zoomType != 'undefined')
|
||||
{
|
||||
var zoomWidth = 40 * workflow.zoomType;
|
||||
var zoomHeight = 40 * workflow.zoomType;
|
||||
this.setDimension(zoomWidth, zoomHeight);
|
||||
}
|
||||
this.stroke=2;
|
||||
VectorFigure.call(this);
|
||||
this.stroke =2;
|
||||
|
||||
//Setting width and height values as per the zoom ratio
|
||||
if(typeof workflow.zoomWidth != 'undefined' || typeof workflow.zoomHeight != 'undefined')
|
||||
this.setDimension(workflow.zoomWidth+10, workflow.zoomHeight+10);
|
||||
else
|
||||
this.setDimension(40,40);
|
||||
};
|
||||
|
||||
bpmnGatewayComplex.prototype=new VectorFigure;
|
||||
bpmnGatewayComplex.prototype.type="bpmnGatewayComplex";
|
||||
bpmnGatewayComplex.prototype.paint=function(){
|
||||
VectorFigure.prototype.paint.call(this);
|
||||
if(typeof workflow.zoomfactor == 'undefined')
|
||||
workflow.zoomfactor = 1;
|
||||
VectorFigure.prototype.paint.call(this);
|
||||
if(typeof workflow.zoomfactor == 'undefined')
|
||||
workflow.zoomfactor = 1;
|
||||
|
||||
//Set the Task Limitation
|
||||
if(typeof this.limitFlag == 'undefined' || this.limitFlag == false)
|
||||
{
|
||||
this.originalWidth = 40;
|
||||
this.originalHeight = 40;
|
||||
this.orgXPos = this.getX();
|
||||
this.orgYPos = this.getY();
|
||||
this.orgFontSize =this.fontSize;
|
||||
}
|
||||
this.width = this.originalWidth * workflow.zoomfactor;
|
||||
this.height = this.originalHeight * workflow.zoomfactor;
|
||||
if(typeof this.limitFlag == 'undefined' || this.limitFlag == false)
|
||||
{
|
||||
this.originalWidth = 40;
|
||||
this.originalHeight = 40;
|
||||
this.orgXPos = this.getX();
|
||||
this.orgYPos = this.getY();
|
||||
this.orgFontSize =this.fontSize;
|
||||
}
|
||||
|
||||
var x=new Array(0,this.width/2,this.width,this.width/2);
|
||||
var y=new Array(this.height/2,this.height,this.height/2,0);
|
||||
this.width = this.originalWidth * workflow.zoomfactor;
|
||||
this.height = this.originalHeight * workflow.zoomfactor;
|
||||
|
||||
var x2 = new Array();
|
||||
var y2 = new Array();
|
||||
var x=new Array(0,this.width/2,this.width,this.width/2);
|
||||
var y=new Array(this.height/2,this.height,this.height/2,0);
|
||||
|
||||
for(var i=0;i<x.length;i++){
|
||||
x2[i]=x[i]+4;
|
||||
y2[i]=y[i]+1;
|
||||
}
|
||||
this.graphics.setStroke(this.stroke);
|
||||
this.graphics.setColor( "#c0c0c0" );
|
||||
this.graphics.fillPolygon(x2,y2);
|
||||
this.graphics.setStroke(this.stroke);
|
||||
this.graphics.setColor( "#fdf3e0" );
|
||||
this.graphics.fillPolygon(x,y);
|
||||
this.graphics.setColor("#a27628");
|
||||
this.graphics.drawPolygon(x,y);
|
||||
/*var x_cross=new Array(5,15,25,30,20,30,25,15,5,0,10,0);
|
||||
var y_cross=new Array(30,20,30,25,15,5,0,10,0,5,15,25);
|
||||
this.graphics.setColor( "#000000" );
|
||||
this.graphics.fillPolygon(x_cross,y_cross);
|
||||
var x_plus =new Array(10,20,20,30,30,20,20,10,10,0,0,10);
|
||||
var y_plus=new Array(30,30,20,20,10,10,0,0,10,10,20,20);
|
||||
this.graphics.fillPolygon(x_plus,y_plus);*/
|
||||
this.graphics.setStroke(4);
|
||||
this.graphics.drawLine(this.getWidth()/4.5,this.getHeight()/2,this.getWidth()/1.3,this.getHeight()/2); //horizontal line
|
||||
this.graphics.drawLine(this.getWidth()/3,this.getHeight()/1.5,this.getWidth()/1.5,this.getHeight()/3); //cross line
|
||||
this.graphics.drawLine(this.getWidth()/2,this.getHeight()/1.3,this.getWidth()/2,this.getHeight()/4.5); //vertical line
|
||||
this.graphics.drawLine(this.getWidth()/1.5,this.getHeight()/1.5,this.getWidth()/3,this.getHeight()/3); //cross line
|
||||
this.graphics.paint();
|
||||
var x2 = new Array();
|
||||
var y2 = new Array();
|
||||
|
||||
if (this.input1 != null) {
|
||||
this.input1.setPosition(0, this.height / 2);
|
||||
}
|
||||
if (this.input2 != null) {
|
||||
this.input2.setPosition(this.width / 2, 0);
|
||||
}
|
||||
if (this.output1 != null) {
|
||||
this.output1.setPosition(this.height / 2, this.width);
|
||||
}
|
||||
if (this.output2 != null) {
|
||||
this.output2.setPosition(this.width, this.height / 2);
|
||||
}
|
||||
for(var i=0;i<x.length;i++){
|
||||
x2[i]=x[i]+4;
|
||||
y2[i]=y[i]+1;
|
||||
}
|
||||
this.graphics.setStroke(this.stroke);
|
||||
this.graphics.setColor( "#c0c0c0" );
|
||||
this.graphics.fillPolygon(x2,y2);
|
||||
this.graphics.setStroke(this.stroke);
|
||||
this.graphics.setColor( "#fdf3e0" );
|
||||
this.graphics.fillPolygon(x,y);
|
||||
this.graphics.setColor("#a27628");
|
||||
this.graphics.drawPolygon(x,y);
|
||||
|
||||
this.graphics.setStroke(4);
|
||||
this.graphics.drawLine(this.getWidth()/4.5,this.getHeight()/2,this.getWidth()/1.3,this.getHeight()/2); //horizontal line
|
||||
this.graphics.drawLine(this.getWidth()/3,this.getHeight()/1.5,this.getWidth()/1.5,this.getHeight()/3); //cross line
|
||||
this.graphics.drawLine(this.getWidth()/2,this.getHeight()/1.3,this.getWidth()/2,this.getHeight()/4.5); //vertical line
|
||||
this.graphics.drawLine(this.getWidth()/1.5,this.getHeight()/1.5,this.getWidth()/3,this.getHeight()/3); //cross line
|
||||
this.graphics.paint();
|
||||
|
||||
if (this.input1 != null) {
|
||||
this.input1.setPosition(0, this.height / 2);
|
||||
}
|
||||
if (this.input2 != null) {
|
||||
this.input2.setPosition(this.width / 2, 0);
|
||||
}
|
||||
if (this.output1 != null) {
|
||||
this.output1.setPosition(this.height / 2, this.width);
|
||||
}
|
||||
if (this.output2 != null) {
|
||||
this.output2.setPosition(this.width, this.height / 2);
|
||||
}
|
||||
if (this.output3 != null) {
|
||||
this.output3.setPosition(0, this.height /2 );
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
bpmnGatewayComplex.prototype.setWorkflow=function(_40c5){
|
||||
VectorFigure.prototype.setWorkflow.call(this,_40c5);
|
||||
if(_40c5!=null){
|
||||
var gatewayPortName = ['input1','input2','output1','output2'];
|
||||
var gatewayPortType = ['InputPort','InputPort','OutputPort','OutputPort'];
|
||||
var gatewayPositionX= [0,this.width/2,this.height/2,this.width];
|
||||
var gatewayPositionY= [this.height/2,0,this.width,this.height/2];
|
||||
VectorFigure.prototype.setWorkflow.call(this,_40c5);
|
||||
if(_40c5!=null){
|
||||
var h2 = this.height/2;
|
||||
var w2 = this.width/2;
|
||||
|
||||
var gatewayPortName = ['output1', 'output2', 'output3', 'input1', 'input2' ];
|
||||
var gatewayPortType = ['OutputPort','OutputPort','OutputPort','InputPort','InputPort'];
|
||||
var gatewayPositionX= [w2, this.width, 0 , 0, w2 ];
|
||||
var gatewayPositionY= [this.width, h2, h2, h2, 0 ];
|
||||
|
||||
for(var i=0; i< gatewayPortName.length ; i++){
|
||||
eval('this.'+gatewayPortName[i]+' = new '+gatewayPortType[i]+'()'); //Create New Port
|
||||
eval('this.'+gatewayPortName[i]+'.setWorkflow(_40c5)'); //Add port to the workflow
|
||||
eval('this.'+gatewayPortName[i]+'.setName("'+gatewayPortName[i]+'")'); //Set PortName
|
||||
eval('this.'+gatewayPortName[i]+'.setZOrder(-1)'); //Set Z-Order of the port to -1. It will be below all the figure
|
||||
eval('this.'+gatewayPortName[i]+'.setBackgroundColor(new Color(255, 255, 255))'); //Setting Background of the port to white
|
||||
eval('this.'+gatewayPortName[i]+'.setColor(new Color(255, 255, 255))'); //Setting Border of the port to white
|
||||
eval('this.addPort(this.'+gatewayPortName[i]+','+gatewayPositionX[i]+', '+gatewayPositionY[i]+')'); //Setting Position of the port
|
||||
}
|
||||
}
|
||||
eval('this.'+gatewayPortName[i]+' = new '+gatewayPortType[i]+'()');
|
||||
eval('this.'+gatewayPortName[i]+'.setWorkflow(_40c5)');
|
||||
eval('this.'+gatewayPortName[i]+'.setName("'+gatewayPortName[i]+'")');
|
||||
eval('this.'+gatewayPortName[i]+'.setZOrder(-1)');
|
||||
eval('this.'+gatewayPortName[i]+'.setBackgroundColor(new Color(255, 255, 255))');
|
||||
eval('this.'+gatewayPortName[i]+'.setColor(new Color(255, 255, 255))');
|
||||
eval('this.addPort(this.'+gatewayPortName[i]+','+gatewayPositionX[i]+', '+gatewayPositionY[i]+')');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
bpmnGatewayComplex.prototype.getContextMenu=function(){
|
||||
if(this.id != null){
|
||||
this.workflow.handleContextMenu(this);
|
||||
}
|
||||
if(this.id != null){
|
||||
this.workflow.handleContextMenu(this);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
bpmnGatewayExclusiveData=function(width,_30ab){
|
||||
VectorFigure.call(this);
|
||||
this.stroke =2;
|
||||
|
||||
//Setting width and height values as per the zoom ratio
|
||||
if(typeof workflow.zoomWidth != 'undefined' || typeof workflow.zoomHeight != 'undefined')
|
||||
this.setDimension(workflow.zoomWidth+10, workflow.zoomHeight+10);
|
||||
@@ -54,7 +55,7 @@ bpmnGatewayExclusiveData.prototype.paint=function(){
|
||||
this.graphics.fillPolygon( x_cross, y_cross);
|
||||
this.graphics.paint();
|
||||
if (this.input1 != null) {
|
||||
this.input1.setPosition(10, this.height / 2);
|
||||
this.input1.setPosition(0, this.height / 2);
|
||||
}
|
||||
if (this.input2 != null) {
|
||||
this.input2.setPosition(this.width / 2, 0);
|
||||
@@ -78,7 +79,7 @@ bpmnGatewayExclusiveData.prototype.setWorkflow=function(_40c5){
|
||||
var h2 = this.height/2;
|
||||
var w2 = this.width/2;
|
||||
|
||||
var gatewayPortName = ['output1', 'output3', 'output2', 'input1', 'input2' ];
|
||||
var gatewayPortName = ['output1', 'output2', 'output3', 'input1', 'input2' ];
|
||||
var gatewayPortType = ['OutputPort','OutputPort','OutputPort','InputPort','InputPort'];
|
||||
var gatewayPositionX= [w2, this.width, 0 , 0, w2 ];
|
||||
var gatewayPositionY= [this.width, h2, h2, h2, 0 ];
|
||||
|
||||
@@ -1,100 +1,109 @@
|
||||
bpmnGatewayExclusiveEvent=function(width,_30ab){
|
||||
VectorFigure.call(this);
|
||||
//Setting width and height values as per the zoom ratio
|
||||
if(typeof workflow.zoomWidth != 'undefined' || typeof workflow.zoomHeight != 'undefined')
|
||||
this.setDimension(workflow.zoomWidth+10, workflow.zoomHeight+10);
|
||||
else
|
||||
VectorFigure.call(this);
|
||||
this.stroke =2;
|
||||
|
||||
//Setting width and height values as per the zoom ratio
|
||||
if(typeof workflow.zoomWidth != 'undefined' || typeof workflow.zoomHeight != 'undefined')
|
||||
this.setDimension(workflow.zoomWidth+10, workflow.zoomHeight+10);
|
||||
else
|
||||
this.setDimension(40,40);
|
||||
this.stroke=2;
|
||||
};
|
||||
|
||||
bpmnGatewayExclusiveEvent.prototype=new VectorFigure;
|
||||
bpmnGatewayExclusiveEvent.prototype.type="bpmnGatewayExclusiveEvent";
|
||||
bpmnGatewayExclusiveEvent.prototype.paint=function(){
|
||||
VectorFigure.prototype.paint.call(this);
|
||||
if(typeof workflow.zoomfactor == 'undefined')
|
||||
workflow.zoomfactor = 1;
|
||||
bpmnGatewayExclusiveEvent.prototype.paint=function() {
|
||||
VectorFigure.prototype.paint.call(this);
|
||||
if (typeof workflow.zoomfactor == 'undefined')
|
||||
workflow.zoomfactor = 1;
|
||||
|
||||
//Set the Task Limitation
|
||||
if(typeof this.limitFlag == 'undefined' || this.limitFlag == false)
|
||||
{
|
||||
this.originalWidth = 40;
|
||||
this.originalHeight = 40;
|
||||
this.orgXPos = this.getX();
|
||||
this.orgYPos = this.getY();
|
||||
this.orgFontSize =this.fontSize;
|
||||
}
|
||||
this.width = this.originalWidth * workflow.zoomfactor;
|
||||
this.height = this.originalHeight * workflow.zoomfactor;
|
||||
if(typeof this.limitFlag == 'undefined' || this.limitFlag == false)
|
||||
{
|
||||
this.originalWidth = 40;
|
||||
this.originalHeight = 40;
|
||||
this.orgXPos = this.getX();
|
||||
this.orgYPos = this.getY();
|
||||
this.orgFontSize =this.fontSize;
|
||||
}
|
||||
this.width = this.originalWidth * workflow.zoomfactor;
|
||||
this.height = this.originalHeight * workflow.zoomfactor;
|
||||
|
||||
var x=new Array(0,this.width/2,this.width,this.width/2);
|
||||
var y=new Array(this.height/2,this.height,this.height/2,0);
|
||||
|
||||
var x2 = new Array();
|
||||
var y2 = new Array();
|
||||
|
||||
for(var i=0;i<x.length;i++){
|
||||
x2[i]=x[i]+4;
|
||||
y2[i]=y[i]+1;
|
||||
}
|
||||
|
||||
this.graphics.setStroke(this.stroke);
|
||||
this.graphics.setColor( "#c0c0c0" );
|
||||
this.graphics.fillPolygon(x2,y2);
|
||||
this.graphics.setStroke(this.stroke);
|
||||
this.graphics.setColor( "#fdf3e0" );
|
||||
this.graphics.fillPolygon(x,y);
|
||||
this.graphics.setColor("#a27628");
|
||||
this.graphics.drawPolygon(x,y);
|
||||
|
||||
this.graphics.setColor("#a27628");
|
||||
this.graphics.drawEllipse(this.getWidth()/4,this.getHeight()/4,this.getWidth()/2,this.getHeight()/2);
|
||||
this.graphics.drawEllipse(this.getWidth()/6,this.getHeight()/6,this.getWidth()/1.5,this.getHeight()/1.5);
|
||||
|
||||
var x=new Array(0,this.width/2,this.width,this.width/2);
|
||||
var y=new Array(this.height/2,this.height,this.height/2,0);
|
||||
var x_penta=new Array(this.getWidth()/3, this.getWidth()/2, this.getWidth()/1.5, this.getWidth()/1.7, this.getWidth()/2.4, this.getWidth()/3);
|
||||
var y_penta=new Array(this.getHeight()/2.3, this.getHeight()/2.8, this.getHeight()/2.3, this.getHeight()/1.6, this.getHeight()/1.6, this.getHeight()/2.3);
|
||||
|
||||
var x2 = new Array();
|
||||
var y2 = new Array();
|
||||
this.graphics.setColor( "#a27628" );
|
||||
this.graphics.fillPolygon(x_penta,y_penta);
|
||||
this.graphics.setColor("#a27628");
|
||||
this.graphics.drawPolygon(x_penta,y_penta);
|
||||
this.graphics.setColor("#a27628");
|
||||
this.graphics.paint();
|
||||
|
||||
for(var i=0;i<x.length;i++){
|
||||
x2[i]=x[i]+4;
|
||||
y2[i]=y[i]+1;
|
||||
}
|
||||
this.graphics.setStroke(this.stroke);
|
||||
this.graphics.setColor( "#c0c0c0" );
|
||||
this.graphics.fillPolygon(x2,y2);
|
||||
this.graphics.setStroke(this.stroke);
|
||||
this.graphics.setColor( "#fdf3e0" );
|
||||
this.graphics.fillPolygon(x,y);
|
||||
this.graphics.setColor("#a27628");
|
||||
this.graphics.drawPolygon(x,y);
|
||||
//this.graphics.setStroke(2);
|
||||
this.graphics.setColor("#a27628");
|
||||
this.graphics.drawEllipse(this.getWidth()/4,this.getHeight()/4,this.getWidth()/2,this.getHeight()/2);
|
||||
this.graphics.drawEllipse(this.getWidth()/6,this.getHeight()/6,this.getWidth()/1.5,this.getHeight()/1.5);
|
||||
//var x_penta=new Array(20,30,40,35,25,20);
|
||||
//var y_penta=new Array(26,21,26,36,36,26);
|
||||
var x_penta=new Array(this.getWidth()/3, this.getWidth()/2, this.getWidth()/1.5, this.getWidth()/1.7, this.getWidth()/2.4, this.getWidth()/3);
|
||||
var y_penta=new Array(this.getHeight()/2.3, this.getHeight()/2.8, this.getHeight()/2.3, this.getHeight()/1.6, this.getHeight()/1.6, this.getHeight()/2.3);
|
||||
//this.graphics.setStroke(2);
|
||||
this.graphics.setColor( "#a27628" );
|
||||
this.graphics.fillPolygon(x_penta,y_penta);
|
||||
this.graphics.setColor("#a27628");
|
||||
this.graphics.drawPolygon(x_penta,y_penta);
|
||||
this.graphics.setColor("#a27628");
|
||||
this.graphics.paint();
|
||||
if (this.input1 != null) {
|
||||
this.input1.setPosition(0, this.height / 2);
|
||||
}
|
||||
if (this.input2 != null) {
|
||||
this.input2.setPosition(this.width / 2, 0);
|
||||
}
|
||||
if (this.output1 != null) {
|
||||
this.output1.setPosition(this.height / 2, this.width);
|
||||
}
|
||||
if (this.output2 != null) {
|
||||
this.output2.setPosition(this.width, this.height / 2);
|
||||
}
|
||||
if (this.input1 != null) {
|
||||
this.input1.setPosition(0, this.height / 2);
|
||||
}
|
||||
if (this.input2 != null) {
|
||||
this.input2.setPosition(this.width / 2, 0);
|
||||
}
|
||||
if (this.output1 != null) {
|
||||
this.output1.setPosition(this.height / 2, this.width);
|
||||
}
|
||||
if (this.output2 != null) {
|
||||
this.output2.setPosition(this.width, this.height / 2);
|
||||
}
|
||||
if (this.output3 != null) {
|
||||
this.output3.setPosition(0, this.height /2 );
|
||||
}
|
||||
};
|
||||
|
||||
bpmnGatewayExclusiveEvent.prototype.setWorkflow=function(_40c5){
|
||||
VectorFigure.prototype.setWorkflow.call(this,_40c5);
|
||||
if(_40c5!=null){
|
||||
var gatewayPortName = ['input1','input2','output1','output2'];
|
||||
var gatewayPortType = ['InputPort','InputPort','OutputPort','OutputPort'];
|
||||
var gatewayPositionX= [0,this.width/2,this.height/2,this.width];
|
||||
var gatewayPositionY= [this.height/2,0,this.width,this.height/2];
|
||||
|
||||
VectorFigure.prototype.setWorkflow.call(this,_40c5);
|
||||
if(_40c5!=null){
|
||||
var h2 = this.height/2;
|
||||
var w2 = this.width/2;
|
||||
|
||||
var gatewayPortName = ['output1', 'output2', 'output3', 'input1', 'input2' ];
|
||||
var gatewayPortType = ['OutputPort','OutputPort','OutputPort','InputPort','InputPort'];
|
||||
var gatewayPositionX= [w2, this.width, 0 , 0, w2 ];
|
||||
var gatewayPositionY= [this.width, h2, h2, h2, 0 ];
|
||||
|
||||
for(var i=0; i< gatewayPortName.length ; i++){
|
||||
eval('this.'+gatewayPortName[i]+' = new '+gatewayPortType[i]+'()'); //Create New Port
|
||||
eval('this.'+gatewayPortName[i]+'.setWorkflow(_40c5)'); //Add port to the workflow
|
||||
eval('this.'+gatewayPortName[i]+'.setName("'+gatewayPortName[i]+'")'); //Set PortName
|
||||
eval('this.'+gatewayPortName[i]+'.setZOrder(-1)'); //Set Z-Order of the port to -1. It will be below all the figure
|
||||
eval('this.'+gatewayPortName[i]+'.setBackgroundColor(new Color(255, 255, 255))'); //Setting Background of the port to white
|
||||
eval('this.'+gatewayPortName[i]+'.setColor(new Color(255, 255, 255))'); //Setting Border of the port to white
|
||||
eval('this.addPort(this.'+gatewayPortName[i]+','+gatewayPositionX[i]+', '+gatewayPositionY[i]+')'); //Setting Position of the port
|
||||
}
|
||||
}
|
||||
eval('this.'+gatewayPortName[i]+' = new '+gatewayPortType[i]+'()');
|
||||
eval('this.'+gatewayPortName[i]+'.setWorkflow(_40c5)');
|
||||
eval('this.'+gatewayPortName[i]+'.setName("'+gatewayPortName[i]+'")');
|
||||
eval('this.'+gatewayPortName[i]+'.setZOrder(-1)');
|
||||
eval('this.'+gatewayPortName[i]+'.setBackgroundColor(new Color(255, 255, 255))');
|
||||
eval('this.'+gatewayPortName[i]+'.setColor(new Color(255, 255, 255))');
|
||||
eval('this.addPort(this.'+gatewayPortName[i]+','+gatewayPositionX[i]+', '+gatewayPositionY[i]+')');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
bpmnGatewayExclusiveEvent.prototype.getContextMenu=function(){
|
||||
if(this.id != null){
|
||||
this.workflow.handleContextMenu(this);
|
||||
}
|
||||
if(this.id != null){
|
||||
this.workflow.handleContextMenu(this);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1,90 +1,102 @@
|
||||
bpmnGatewayInclusive=function(width,_30ab){
|
||||
VectorFigure.call(this);
|
||||
VectorFigure.call(this);
|
||||
this.stroke =2;
|
||||
|
||||
//Setting width and height values as per the zoom ratio
|
||||
if(typeof workflow.zoomWidth != 'undefined' || typeof workflow.zoomHeight != 'undefined')
|
||||
this.setDimension(workflow.zoomWidth+10, workflow.zoomHeight+10);
|
||||
else
|
||||
this.setDimension(40,40);
|
||||
};
|
||||
|
||||
bpmnGatewayInclusive.prototype=new VectorFigure;
|
||||
bpmnGatewayInclusive.prototype.type="bpmnGatewayInclusive";
|
||||
bpmnGatewayInclusive.prototype.paint=function(){
|
||||
VectorFigure.prototype.paint.call(this);
|
||||
if(typeof workflow.zoomfactor == 'undefined')
|
||||
workflow.zoomfactor = 1;
|
||||
VectorFigure.prototype.paint.call(this);
|
||||
if(typeof workflow.zoomfactor == 'undefined')
|
||||
workflow.zoomfactor = 1;
|
||||
|
||||
//Set the Task Limitation
|
||||
if(typeof this.limitFlag == 'undefined' || this.limitFlag == false)
|
||||
{
|
||||
this.originalWidth = 40;
|
||||
this.originalHeight = 40;
|
||||
this.orgXPos = this.getX();
|
||||
this.orgYPos = this.getY();
|
||||
this.orgFontSize =this.fontSize;
|
||||
}
|
||||
this.width = this.originalWidth * workflow.zoomfactor;
|
||||
this.height = this.originalHeight * workflow.zoomfactor;
|
||||
//var x=new Array(15,50,15,-20);
|
||||
//var y=new Array(50,15,-20,15);
|
||||
var x=new Array(0,this.width/2,this.width,this.width/2);
|
||||
var y=new Array(this.height/2,this.height,this.height/2,0);
|
||||
if(typeof this.limitFlag == 'undefined' || this.limitFlag == false)
|
||||
{
|
||||
this.originalWidth = 40;
|
||||
this.originalHeight = 40;
|
||||
this.orgXPos = this.getX();
|
||||
this.orgYPos = this.getY();
|
||||
this.orgFontSize =this.fontSize;
|
||||
}
|
||||
|
||||
var x2 = new Array();
|
||||
var y2 = new Array();
|
||||
this.width = this.originalWidth * workflow.zoomfactor;
|
||||
this.height = this.originalHeight * workflow.zoomfactor;
|
||||
|
||||
for(var i=0;i<x.length;i++){
|
||||
x2[i]=x[i]+4;
|
||||
y2[i]=y[i]+1;
|
||||
}
|
||||
this.graphics.setStroke(this.stroke);
|
||||
this.graphics.setColor( "#c0c0c0" );
|
||||
this.graphics.fillPolygon(x2,y2);
|
||||
this.graphics.setStroke(2);
|
||||
this.graphics.setColor( "#fdf3e0" );
|
||||
this.graphics.fillPolygon(x,y);
|
||||
this.graphics.setColor("#a27628");
|
||||
this.graphics.drawPolygon(x,y);
|
||||
var x_cir = 15;
|
||||
var y_cir = 15;
|
||||
/*this.graphics.setStroke(3);
|
||||
this.graphics.setColor( "#a27628" );
|
||||
this.graphics.fillEllipse(this.getWidth()/4,this.getHeight()/4,this.getWidth()/2,this.getHeight()/2);*/
|
||||
this.graphics.setColor("#a27628");
|
||||
this.graphics.drawEllipse(this.getWidth()/4,this.getHeight()/4,this.getWidth()/2,this.getHeight()/2);
|
||||
this.graphics.paint();
|
||||
if (this.input1 != null) {
|
||||
this.input1.setPosition(0, this.height / 2);
|
||||
}
|
||||
if (this.input2 != null) {
|
||||
this.input2.setPosition(this.width / 2, 0);
|
||||
}
|
||||
if (this.output1 != null) {
|
||||
this.output1.setPosition(this.height / 2, this.width);
|
||||
}
|
||||
if (this.output2 != null) {
|
||||
this.output2.setPosition(this.width, this.height / 2);
|
||||
}
|
||||
var x=new Array(0,this.width/2,this.width,this.width/2);
|
||||
var y=new Array(this.height/2,this.height,this.height/2,0);
|
||||
|
||||
var x2 = new Array();
|
||||
var y2 = new Array();
|
||||
|
||||
for(var i=0;i<x.length;i++){
|
||||
x2[i]=x[i]+4;
|
||||
y2[i]=y[i]+1;
|
||||
}
|
||||
this.graphics.setStroke(this.stroke);
|
||||
this.graphics.setColor( "#c0c0c0" );
|
||||
this.graphics.fillPolygon(x2,y2);
|
||||
this.graphics.setStroke(2);
|
||||
this.graphics.setColor( "#fdf3e0" );
|
||||
this.graphics.fillPolygon(x,y);
|
||||
this.graphics.setColor("#a27628");
|
||||
this.graphics.drawPolygon(x,y);
|
||||
var x_cir = 15;
|
||||
var y_cir = 15;
|
||||
|
||||
this.graphics.setColor("#a27628");
|
||||
this.graphics.drawEllipse(this.getWidth()/4,this.getHeight()/4,this.getWidth()/2,this.getHeight()/2);
|
||||
this.graphics.paint();
|
||||
|
||||
if (this.input1 != null) {
|
||||
this.input1.setPosition(0, this.height / 2);
|
||||
}
|
||||
if (this.input2 != null) {
|
||||
this.input2.setPosition(this.width / 2, 0);
|
||||
}
|
||||
if (this.output1 != null) {
|
||||
this.output1.setPosition(this.height / 2, this.width);
|
||||
}
|
||||
if (this.output2 != null) {
|
||||
this.output2.setPosition(this.width, this.height / 2);
|
||||
}
|
||||
if (this.output3 != null) {
|
||||
this.output3.setPosition(0, this.height /2 );
|
||||
}
|
||||
};
|
||||
|
||||
bpmnGatewayInclusive.prototype.setWorkflow=function(_40c5){
|
||||
VectorFigure.prototype.setWorkflow.call(this,_40c5);
|
||||
if(_40c5!=null){
|
||||
var gatewayPortName = ['input1','input2','output1','output2'];
|
||||
var gatewayPortType = ['InputPort','InputPort','OutputPort','OutputPort'];
|
||||
var gatewayPositionX= [20,this.width/2,this.height/2,this.width];
|
||||
var gatewayPositionY= [this.height/2,0,this.width,this.height/2];
|
||||
VectorFigure.prototype.setWorkflow.call(this,_40c5);
|
||||
if(_40c5!=null){
|
||||
var h2 = this.height/2;
|
||||
var w2 = this.width/2;
|
||||
|
||||
var gatewayPortName = ['output1', 'output2', 'output3', 'input1', 'input2' ];
|
||||
var gatewayPortType = ['OutputPort','OutputPort','OutputPort','InputPort','InputPort'];
|
||||
var gatewayPositionX= [w2, this.width, 0 , 0, w2 ];
|
||||
var gatewayPositionY= [this.width, h2, h2, h2, 0 ];
|
||||
|
||||
for(var i=0; i< gatewayPortName.length ; i++){
|
||||
eval('this.'+gatewayPortName[i]+' = new '+gatewayPortType[i]+'()'); //Create New Port
|
||||
eval('this.'+gatewayPortName[i]+'.setWorkflow(_40c5)'); //Add port to the workflow
|
||||
eval('this.'+gatewayPortName[i]+'.setName("'+gatewayPortName[i]+'")'); //Set PortName
|
||||
eval('this.'+gatewayPortName[i]+'.setZOrder(-1)'); //Set Z-Order of the port to -1. It will be below all the figure
|
||||
eval('this.'+gatewayPortName[i]+'.setBackgroundColor(new Color(255, 255, 255))'); //Setting Background of the port to white
|
||||
eval('this.'+gatewayPortName[i]+'.setColor(new Color(255, 255, 255))'); //Setting Border of the port to white
|
||||
eval('this.addPort(this.'+gatewayPortName[i]+','+gatewayPositionX[i]+', '+gatewayPositionY[i]+')'); //Setting Position of the port
|
||||
}
|
||||
}
|
||||
eval('this.'+gatewayPortName[i]+' = new '+gatewayPortType[i]+'()'); //Create New Port
|
||||
eval('this.'+gatewayPortName[i]+'.setWorkflow(_40c5)'); //Add port to the workflow
|
||||
eval('this.'+gatewayPortName[i]+'.setName("'+gatewayPortName[i]+'")'); //Set PortName
|
||||
eval('this.'+gatewayPortName[i]+'.setZOrder(-1)'); //Set Z-Order of the port to -1. It will be below all the figure
|
||||
eval('this.'+gatewayPortName[i]+'.setBackgroundColor(new Color(255, 255, 255))'); //Setting Background of the port to white
|
||||
eval('this.'+gatewayPortName[i]+'.setColor(new Color(255, 255, 255))'); //Setting Border of the port to white
|
||||
eval('this.addPort(this.'+gatewayPortName[i]+','+gatewayPositionX[i]+', '+gatewayPositionY[i]+')'); //Setting Position of the port
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
bpmnGatewayInclusive.prototype.getContextMenu=function(){
|
||||
if(this.id != null){
|
||||
this.workflow.handleContextMenu(this);
|
||||
}
|
||||
if(this.id != null){
|
||||
this.workflow.handleContextMenu(this);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1,98 +1,106 @@
|
||||
bpmnGatewayParallel=function(width,_30ab){
|
||||
VectorFigure.call(this);
|
||||
//Setting width and height values as per the zoom ratio
|
||||
if(typeof workflow.zoomWidth != 'undefined' || typeof workflow.zoomHeight != 'undefined')
|
||||
this.setDimension(workflow.zoomWidth+10, workflow.zoomHeight+10);
|
||||
else
|
||||
VectorFigure.call(this);
|
||||
this.stroke =2;
|
||||
|
||||
//Setting width and height values as per the zoom ratio
|
||||
if(typeof workflow.zoomWidth != 'undefined' || typeof workflow.zoomHeight != 'undefined')
|
||||
this.setDimension(workflow.zoomWidth+10, workflow.zoomHeight+10);
|
||||
else
|
||||
this.setDimension(40,40);
|
||||
};
|
||||
|
||||
bpmnGatewayParallel.prototype=new VectorFigure;
|
||||
bpmnGatewayParallel.prototype.type="bpmnGatewayParallel";
|
||||
bpmnGatewayParallel.prototype.paint=function(){
|
||||
VectorFigure.prototype.paint.call(this);
|
||||
VectorFigure.prototype.paint.call(this);
|
||||
|
||||
if(typeof workflow.zoomfactor == 'undefined')
|
||||
workflow.zoomfactor = 1;
|
||||
|
||||
if(typeof workflow.zoomfactor == 'undefined')
|
||||
workflow.zoomfactor = 1;
|
||||
//Set the Task Limitation
|
||||
if(typeof this.limitFlag == 'undefined' || this.limitFlag == false)
|
||||
{
|
||||
this.originalWidth = 40;
|
||||
this.originalHeight = 40;
|
||||
this.orgXPos = this.getX();
|
||||
this.orgYPos = this.getY();
|
||||
this.orgFontSize =this.fontSize;
|
||||
}
|
||||
this.width = this.originalWidth * workflow.zoomfactor;
|
||||
this.height = this.originalHeight * workflow.zoomfactor;
|
||||
var x=new Array(0,this.width/2,this.width,this.width/2);
|
||||
var y=new Array(this.height/2,this.height,this.height/2,0);
|
||||
if(typeof this.limitFlag == 'undefined' || this.limitFlag == false)
|
||||
{
|
||||
this.originalWidth = 40;
|
||||
this.originalHeight = 40;
|
||||
this.orgXPos = this.getX();
|
||||
this.orgYPos = this.getY();
|
||||
this.orgFontSize =this.fontSize;
|
||||
}
|
||||
|
||||
var x2 = new Array();
|
||||
var y2 = new Array();
|
||||
this.width = this.originalWidth * workflow.zoomfactor;
|
||||
this.height = this.originalHeight * workflow.zoomfactor;
|
||||
var x=new Array(0,this.width/2,this.width,this.width/2);
|
||||
var y=new Array(this.height/2,this.height,this.height/2,0);
|
||||
|
||||
var x2 = new Array();
|
||||
var y2 = new Array();
|
||||
|
||||
for(var i=0;i<x.length;i++){
|
||||
x2[i]=x[i]+4;
|
||||
y2[i]=y[i]+1;
|
||||
}
|
||||
this.graphics.setStroke(this.stroke);
|
||||
this.graphics.setColor( "#c0c0c0" );
|
||||
this.graphics.fillPolygon(x2,y2);
|
||||
this.graphics.setStroke(2);
|
||||
this.graphics.setColor( "#fdf3e0" );
|
||||
this.graphics.fillPolygon(x,y);
|
||||
this.graphics.setColor("#a27628");
|
||||
this.graphics.drawPolygon(x,y);
|
||||
|
||||
for(var i=0;i<x.length;i++){
|
||||
x2[i]=x[i]+4;
|
||||
y2[i]=y[i]+1;
|
||||
}
|
||||
this.graphics.setStroke(this.stroke);
|
||||
this.graphics.setColor( "#c0c0c0" );
|
||||
this.graphics.fillPolygon(x2,y2);
|
||||
this.graphics.setStroke(2);
|
||||
this.graphics.setColor( "#fdf3e0" );
|
||||
this.graphics.fillPolygon(x,y);
|
||||
this.graphics.setColor("#a27628");
|
||||
this.graphics.drawPolygon(x,y);
|
||||
//var x=new Array(25,35,35,45,45,35,35,25,25,15,15,25);
|
||||
//var y=new Array(45,45,35,35,25,25,15,15,25,25,35,35);
|
||||
var x=new Array(this.width/2.4 , this.width/1.7, this.width/1.7, this.width/1.3, this.width/1.3, this.width/1.7, this.width/1.7, this.width/2.4, this.width/2.4, this.width/4, this.width/4, this.width/2.4);
|
||||
var y=new Array(this.height/1.3,this.height/1.3,this.height/1.7,this.height/1.7,this.height/2.4,this.height/2.4,this.height/4,this.height/4,this.height/2.4,this.height/2.4,this.height/1.7,this.height/1.7);
|
||||
this.graphics.setColor( "#a27628" );
|
||||
this.graphics.fillPolygon(x,y);
|
||||
this.graphics.setColor("#a27628");
|
||||
this.graphics.drawPolygon(x,y);
|
||||
this.graphics.paint();
|
||||
var x=new Array(this.width/2.4 , this.width/1.7, this.width/1.7, this.width/1.3, this.width/1.3, this.width/1.7, this.width/1.7, this.width/2.4, this.width/2.4, this.width/4, this.width/4, this.width/2.4);
|
||||
var y=new Array(this.height/1.3,this.height/1.3,this.height/1.7,this.height/1.7,this.height/2.4,this.height/2.4,this.height/4,this.height/4,this.height/2.4,this.height/2.4,this.height/1.7,this.height/1.7);
|
||||
|
||||
if (this.input1 != null) {
|
||||
this.input1.setPosition(0, this.height / 2);
|
||||
}
|
||||
if (this.input2 != null) {
|
||||
this.input2.setPosition(this.width / 2, 0);
|
||||
}
|
||||
if (this.output1 != null) {
|
||||
this.output1.setPosition(this.height / 2, this.width);
|
||||
}
|
||||
if (this.output2 != null) {
|
||||
this.output2.setPosition(this.width, this.height / 2);
|
||||
}
|
||||
this.graphics.setColor( "#a27628" );
|
||||
this.graphics.fillPolygon(x,y);
|
||||
this.graphics.setColor("#a27628");
|
||||
this.graphics.drawPolygon(x,y);
|
||||
this.graphics.paint();
|
||||
|
||||
if (this.input1 != null) {
|
||||
this.input1.setPosition(0, this.height / 2);
|
||||
}
|
||||
if (this.input2 != null) {
|
||||
this.input2.setPosition(this.width / 2, 0);
|
||||
}
|
||||
if (this.output1 != null) {
|
||||
this.output1.setPosition(this.height / 2, this.width);
|
||||
}
|
||||
if (this.output2 != null) {
|
||||
this.output2.setPosition(this.width, this.height / 2);
|
||||
}
|
||||
if (this.output3 != null) {
|
||||
this.output3.setPosition(0, this.height /2 );
|
||||
}
|
||||
};
|
||||
|
||||
bpmnGatewayParallel.prototype.setWorkflow=function(_40c5){
|
||||
VectorFigure.prototype.setWorkflow.call(this,_40c5);
|
||||
if(_40c5!=null){
|
||||
var gatewayPortName = ['input1','input2','output1','output2'];
|
||||
var gatewayPortType = ['InputPort','InputPort','OutputPort','OutputPort'];
|
||||
var gatewayPositionX= [0,this.width/2,this.height/2,this.width];
|
||||
var gatewayPositionY= [this.height/2,0,this.width,this.height/2];
|
||||
|
||||
VectorFigure.prototype.setWorkflow.call(this,_40c5);
|
||||
if(_40c5!=null){
|
||||
var h2 = this.height/2;
|
||||
var w2 = this.width/2;
|
||||
|
||||
var gatewayPortName = ['output1', 'output2', 'output3', 'input1', 'input2' ];
|
||||
var gatewayPortType = ['OutputPort','OutputPort','OutputPort','InputPort','InputPort'];
|
||||
var gatewayPositionX= [w2, this.width, 0 , 0, w2 ];
|
||||
var gatewayPositionY= [this.width, h2, h2, h2, 0 ];
|
||||
|
||||
for(var i=0; i< gatewayPortName.length ; i++){
|
||||
eval('this.'+gatewayPortName[i]+' = new '+gatewayPortType[i]+'()'); //Create New Port
|
||||
eval('this.'+gatewayPortName[i]+'.setWorkflow(_40c5)'); //Add port to the workflow
|
||||
eval('this.'+gatewayPortName[i]+'.setName("'+gatewayPortName[i]+'")'); //Set PortName
|
||||
eval('this.'+gatewayPortName[i]+'.setZOrder(-1)'); //Set Z-Order of the port to -1. It will be below all the figure
|
||||
eval('this.'+gatewayPortName[i]+'.setBackgroundColor(new Color(255, 255, 255))'); //Setting Background of the port to white
|
||||
eval('this.'+gatewayPortName[i]+'.setColor(new Color(255, 255, 255))'); //Setting Border of the port to white
|
||||
eval('this.addPort(this.'+gatewayPortName[i]+','+gatewayPositionX[i]+', '+gatewayPositionY[i]+')'); //Setting Position of the port
|
||||
}
|
||||
}
|
||||
eval('this.'+gatewayPortName[i]+' = new '+gatewayPortType[i]+'()');
|
||||
eval('this.'+gatewayPortName[i]+'.setWorkflow(_40c5)');
|
||||
eval('this.'+gatewayPortName[i]+'.setName("'+gatewayPortName[i]+'")');
|
||||
eval('this.'+gatewayPortName[i]+'.setZOrder(-1)');
|
||||
eval('this.'+gatewayPortName[i]+'.setBackgroundColor(new Color(255, 255, 255))');
|
||||
eval('this.'+gatewayPortName[i]+'.setColor(new Color(255, 255, 255))');
|
||||
eval('this.addPort(this.'+gatewayPortName[i]+','+gatewayPositionX[i]+', '+gatewayPositionY[i]+')');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
bpmnGatewayParallel.prototype.getContextMenu=function(){
|
||||
if(this.id != null){
|
||||
this.workflow.handleContextMenu(this);
|
||||
}
|
||||
if(this.id != null){
|
||||
this.workflow.handleContextMenu(this);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -767,7 +767,7 @@ MyWorkflow.prototype.disablePorts=function(oShape)
|
||||
{
|
||||
if(oShape.type != ''){
|
||||
var ports ='';
|
||||
if(oShape.type.match(/bpmnGatewayExclusiveData/)) {
|
||||
if(oShape.type.match(/Gateway/)) {
|
||||
ports = ['output1','input1','output2','input2', 'output3' ];
|
||||
}
|
||||
else if(oShape.type.match(/Task/) || oShape.type.match(/Gateway/) || oShape.type.match(/Inter/) || oShape.type.match(/SubProcess/)) {
|
||||
@@ -802,13 +802,15 @@ MyWorkflow.prototype.enablePorts=function(oShape,aPort)
|
||||
**/
|
||||
for(var i=0; i< aPort.length ; i++)
|
||||
{
|
||||
if(aPort[i].match(/input/))
|
||||
eval('oShape.workflow.currentSelection.'+aPort[i]+'.setBackgroundColor(new Color(245, 115, 115))');
|
||||
else
|
||||
eval('oShape.workflow.currentSelection.'+aPort[i]+'.setBackgroundColor(new Color(115, 115, 245))');
|
||||
|
||||
eval('oShape.workflow.currentSelection.'+aPort[i]+'.setColor(new Color(90, 150, 90))');
|
||||
eval('oShape.workflow.currentSelection.'+aPort[i]+'.setZOrder(50000)');
|
||||
if(aPort[i].match(/input/)) {
|
||||
eval('oShape.workflow.currentSelection.'+aPort[i]+'.setBackgroundColor(new Color(245, 115, 115))');
|
||||
eval('oShape.workflow.currentSelection.'+aPort[i]+'.setZOrder(49000)');
|
||||
}
|
||||
else {
|
||||
eval('oShape.workflow.currentSelection.'+aPort[i]+'.setBackgroundColor(new Color(115, 115, 245))');
|
||||
eval('oShape.workflow.currentSelection.'+aPort[i]+'.setZOrder(50000)');
|
||||
}
|
||||
eval('oShape.workflow.currentSelection.'+aPort[i]+'.setColor(new Color(90, 150, 90))');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -716,10 +716,10 @@ FlowMenu.prototype.onOtherFigureMoved = function (_39fd) {
|
||||
this.actionGateway.setPosition(20, 0);
|
||||
this.addChild(this.actionEndEvent);
|
||||
this.actionEndEvent.setPosition(20, 40);
|
||||
if(bpmnShape.match(/bpmnGatewayExclusiveData/))
|
||||
// if(bpmnShape.match(/bpmnGatewayExclusiveData/))
|
||||
ports = ['output1', 'input1', 'output2', 'input2','output3'];
|
||||
else
|
||||
ports = ['output1', 'input1', 'output2', 'input2'];
|
||||
// else
|
||||
// ports = ['output1', 'input1', 'output2', 'input2'];
|
||||
_39fd.workflow.enablePorts(_39fd, ports);
|
||||
}
|
||||
else if (bpmnShape.match(/Annotation/) || bpmnShape.match(/Dataobject/)) {
|
||||
|
||||
Reference in New Issue
Block a user