diff --git a/workflow/engine/templates/bpmn/Annotation.js b/workflow/engine/templates/bpmn/Annotation.js index bdf3f7427..3ffd4748f 100755 --- a/workflow/engine/templates/bpmn/Annotation.js +++ b/workflow/engine/templates/bpmn/Annotation.js @@ -48,11 +48,11 @@ bpmnAnnotation.prototype.paint = function () { VectorFigure.prototype.paint.call(this); //Set the Task Limitation - if(this.getWidth() > 200 || this.getHeight() > 100) + if((this.getWidth() > 200 || this.getHeight() > 100 ) && this.limitFlag != true) { this.setDimension(200, 100); } - if(this.getWidth() < 110 || this.getHeight() < 60) + if((this.getWidth() < 110 || this.getHeight() < 60 ) && this.limitFlag != true) { this.setDimension(110, 60); } diff --git a/workflow/engine/templates/bpmn/EventEmptyEnd.js b/workflow/engine/templates/bpmn/EventEmptyEnd.js index c42b2a48b..28a72e22c 100755 --- a/workflow/engine/templates/bpmn/EventEmptyEnd.js +++ b/workflow/engine/templates/bpmn/EventEmptyEnd.js @@ -11,7 +11,7 @@ bpmnEventEmptyEnd.prototype=new VectorFigure; bpmnEventEmptyEnd.prototype.type="bpmnEventEmptyEnd"; bpmnEventEmptyEnd.prototype.paint=function(){ VectorFigure.prototype.paint.call(this); -if (this.getWidth() < 30 || this.getHeight() < 30) { +if ((this.getWidth() < 30 || this.getHeight() < 30) && this.limitFlag != true) { this.setDimension(30, 30); } var x=0; diff --git a/workflow/engine/templates/bpmn/EventEmptyInter.js b/workflow/engine/templates/bpmn/EventEmptyInter.js index e922e4873..5f6bfb3a4 100755 --- a/workflow/engine/templates/bpmn/EventEmptyInter.js +++ b/workflow/engine/templates/bpmn/EventEmptyInter.js @@ -11,7 +11,7 @@ bpmnEventEmptyInter.prototype=new VectorFigure; bpmnEventEmptyInter.prototype.type="bpmnEventEmptyInter"; bpmnEventEmptyInter.prototype.paint=function(){ VectorFigure.prototype.paint.call(this); -if (this.getWidth() < 30 || this.getHeight() < 30) { +if ((this.getWidth() < 30 || this.getHeight() < 30) && this.limitFlag != true) { this.setDimension(30, 30); } this.graphics.setStroke(this.stroke); diff --git a/workflow/engine/templates/bpmn/EventEmptyStart.js b/workflow/engine/templates/bpmn/EventEmptyStart.js index 80614cf73..09e946d86 100755 --- a/workflow/engine/templates/bpmn/EventEmptyStart.js +++ b/workflow/engine/templates/bpmn/EventEmptyStart.js @@ -11,7 +11,7 @@ bpmnEventEmptyStart.prototype=new VectorFigure; bpmnEventEmptyStart.prototype.type="bpmnEventEmptyStart"; bpmnEventEmptyStart.prototype.paint=function(){ VectorFigure.prototype.paint.call(this); -if (this.getWidth() < 30 || this.getHeight() < 30) { +if ((this.getWidth() < 30 || this.getHeight() < 30 ) && this.limitFlag != true) { this.setDimension(30, 30); } @@ -27,20 +27,12 @@ this.graphics.setColor("#4aa533"); this.graphics.drawEllipse(x_cir,y_cir,this.getWidth(),this.getHeight()); this.graphics.paint(); - - - + /*Code Added to Dynamically shift Ports on resizing of shapes **/ -if(this.input1!=null){ -this.input1.setPosition(0,this.height/2); -} if(this.output1!=null){ this.output1.setPosition(this.width/2,this.height); } -if(this.input2!=null){ -this.input2.setPosition(this.width/2,0); -} if(this.output2!=null){ this.output2.setPosition(this.width,this.height/2); } diff --git a/workflow/engine/templates/bpmn/GatewayComplex.js b/workflow/engine/templates/bpmn/GatewayComplex.js index ed64147d0..3f1f2bccc 100755 --- a/workflow/engine/templates/bpmn/GatewayComplex.js +++ b/workflow/engine/templates/bpmn/GatewayComplex.js @@ -43,6 +43,19 @@ this.graphics.drawLine(this.getWidth()/2,this.getHeight()/1.3,this.getWidth()/2, 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); +} + }; bpmnGatewayComplex.prototype.setWorkflow=function(_40c5){ diff --git a/workflow/engine/templates/bpmn/GatewayExclusiveData.js b/workflow/engine/templates/bpmn/GatewayExclusiveData.js index 87c1c476b..3b55c395b 100755 --- a/workflow/engine/templates/bpmn/GatewayExclusiveData.js +++ b/workflow/engine/templates/bpmn/GatewayExclusiveData.js @@ -35,6 +35,18 @@ var y_cross=new Array(this.getHeight()/1.3,this.getHeight()/1.7,this.getHeight() this.graphics.setColor( "#a27628" ); this.graphics.fillPolygon(x_cross,y_cross); 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); +} }; diff --git a/workflow/engine/templates/bpmn/GatewayExclusiveEvent.js b/workflow/engine/templates/bpmn/GatewayExclusiveEvent.js index eb81a338a..ffde60e47 100755 --- a/workflow/engine/templates/bpmn/GatewayExclusiveEvent.js +++ b/workflow/engine/templates/bpmn/GatewayExclusiveEvent.js @@ -44,6 +44,18 @@ 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); +} }; bpmnGatewayExclusiveEvent.prototype.setWorkflow=function(_40c5){ diff --git a/workflow/engine/templates/bpmn/GatewayInclusive.js b/workflow/engine/templates/bpmn/GatewayInclusive.js index 072fba005..9b4cad75e 100755 --- a/workflow/engine/templates/bpmn/GatewayInclusive.js +++ b/workflow/engine/templates/bpmn/GatewayInclusive.js @@ -38,6 +38,18 @@ this.graphics.fillEllipse(this.getWidth()/4,this.getHeight()/4,this.getWidth()/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); +} }; bpmnGatewayInclusive.prototype.setWorkflow=function(_40c5){ diff --git a/workflow/engine/templates/bpmn/GatewayParallel.js b/workflow/engine/templates/bpmn/GatewayParallel.js index b619b78b3..aa52ccbb8 100755 --- a/workflow/engine/templates/bpmn/GatewayParallel.js +++ b/workflow/engine/templates/bpmn/GatewayParallel.js @@ -37,6 +37,19 @@ 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); +} }; bpmnGatewayParallel.prototype.setWorkflow=function(_40c5){ diff --git a/workflow/engine/templates/bpmn/MyWorkflow.js b/workflow/engine/templates/bpmn/MyWorkflow.js index f9efd18c3..0bff3251f 100755 --- a/workflow/engine/templates/bpmn/MyWorkflow.js +++ b/workflow/engine/templates/bpmn/MyWorkflow.js @@ -1759,88 +1759,6 @@ MyWorkflow.prototype.getDeleteCriteria = function() * @Param sType string(in/out) * @Author Girish joshi */ -//MyWorkflow.prototype.zoom = function(sType) -//{ -// //workflow.zoomFactor = 1; -// var figures = workflow.getDocument().getFigures(); -// -// var lines=workflow.getLines(); -// var size=lines.getSize(); -// -// if(typeof workflow.limitFlag == 'undefined') -// workflow.limitFlag = 0; -// -// var zoomFactor = 0.2; -// var figSize = figures.getSize(); -// for(f = 0;f 0) -// { -// if(fig.type.match(/Event/) || fig.type.match(/Gateway/) ) -// { -// width -= zoomFactor*25; -// height -= zoomFactor*25; -// workflow.zoomWidth = width; -// workflow.zoomHeight = height; -// } -// else if(fig.type.match(/Annotation/)) { -// width -= zoomFactor*50; -// height -= zoomFactor*50; -// workflow.zoomAnnotationWidth = width; -// workflow.zoomAnnotationHeight = height; -// } -// else -// { -// width -= zoomFactor*50; -// height -= zoomFactor*50; -// workflow.zoomTaskWidth = width; -// workflow.zoomTaskHeight = height; -// } -// --workflow.limitFlag; -// xPos = xPos - zoomFactor*xPos; -// yPos = yPos - zoomFactor*yPos -// fig.setPosition(xPos,yPos); -// } -// fig.setDimension(width,height); -// if(fig.type == 'bpmnTask') -// workflow.redrawTaskText(fig,sType); -// else if(fig.type == 'bpmnAnnotation') -// workflow.redrawAnnotationText(fig,sType); -// } -//} - MyWorkflow.prototype.zoom = function(sType) { //workflow.zoomFactor = 1; @@ -1848,64 +1766,41 @@ MyWorkflow.prototype.zoom = function(sType) var lines=workflow.getLines(); var size=lines.getSize(); - sType =sType/100; - //var zoomFactor = 0.2; var figSize = figures.getSize(); for(f = 0;f 200 || this.getHeight() > 100) { -// this.setDimension(200, 100); -// } -// else if (this.getWidth() < 165 || this.getHeight() < 40) { -// this.setDimension(165, 40); -// } + if ((this.getWidth() > 200 || this.getHeight() > 100 ) && this.limitFlag != true) { + this.setDimension(200, 100); + } + else if ((this.getWidth() < 165 || this.getHeight() < 40) && this.limitFlag != true) { + this.setDimension(165, 40); + } var x = new Array(6, this.getWidth() - 3, this.getWidth(), this.getWidth(), this.getWidth() - 3, 6, 3, 3, 6); var y = new Array(3, 3, 6, this.getHeight() - 3, this.getHeight(), this.getHeight(), this.getHeight() - 3, 6, 3); diff --git a/workflow/engine/templates/bpmn/processmap.js b/workflow/engine/templates/bpmn/processmap.js index 3795eef4d..0733255bc 100755 --- a/workflow/engine/templates/bpmn/processmap.js +++ b/workflow/engine/templates/bpmn/processmap.js @@ -262,14 +262,7 @@ Ext.onReady ( function() { } ] }) - - }, { -// text:'Zoom Out', -// iconCls: 'button_menu_ext ss_sprite ss_zoom_out', -// handler: function() { -// document.getElementById('designerFrame').contentWindow.workflow.zoom('out'); -// } - }, { + },{ text:'Edit Process', iconCls: 'button_menu_ext ss_sprite ss_pencil', handler: function() {