Adding task with same dimension when zoomed...maitaining zoom dimension

This commit is contained in:
girish
2011-02-08 14:47:36 +00:00
parent eed775856b
commit 773e117301
6 changed files with 49 additions and 10 deletions

View File

@@ -10,6 +10,14 @@ bpmnAnnotation = function (_30ab ) {
if(typeof workflow.zoomAnnotationWidth != 'undefined' || typeof workflow.zoomAnnotationHeight != 'undefined')
this.setDimension(workflow.zoomAnnotationWidth, workflow.zoomAnnotationHeight);
//Setting width and height values as per the zoom ratio
if(typeof workflow.zoomType != 'undefined')
{
var zoomWidth = 110 * workflow.zoomType;
var zoomHeight = 60 * workflow.zoomType;
this.setDimension(zoomWidth, zoomHeight);
}
this.setAnnotationName(_30ab.annotationName); //It will set the Default Task Name with appropriate count While dragging a task on the canvas
};

View File

@@ -5,6 +5,14 @@ if(typeof workflow.zoomWidth != 'undefined' || typeof workflow.zoomHeight != 'un
this.setDimension(workflow.zoomWidth, workflow.zoomHeight);
else
this.setDimension(30,30);
//Setting width and height values as per the zoom ratio
if(typeof workflow.zoomType != 'undefined')
{
var zoomWidth = 30 * workflow.zoomType;
var zoomHeight = 30 * workflow.zoomType;
this.setDimension(zoomWidth, zoomHeight);
}
this.stroke=3;
};
bpmnEventEmptyEnd.prototype=new VectorFigure;

View File

@@ -5,6 +5,14 @@ if(typeof workflow.zoomWidth != 'undefined' || typeof workflow.zoomHeight != 'un
this.setDimension(workflow.zoomWidth, workflow.zoomHeight);
else
this.setDimension(30,30);
//Setting width and height values as per the zoom ratio
if(typeof workflow.zoomType != 'undefined')
{
var zoomWidth = 30 * workflow.zoomType;
var zoomHeight = 30 * workflow.zoomType;
this.setDimension(zoomWidth, zoomHeight);
}
this.stroke=2;
};
bpmnEventEmptyStart.prototype=new VectorFigure;

View File

@@ -5,6 +5,14 @@ if(typeof workflow.zoomWidth != 'undefined' || typeof workflow.zoomHeight != 'un
this.setDimension(workflow.zoomWidth+10, workflow.zoomHeight+10);
else
this.setDimension(40,40);
//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;
};
bpmnGatewayComplex.prototype=new VectorFigure;

View File

@@ -1770,6 +1770,7 @@ MyWorkflow.prototype.zoom = function(sType)
sType =sType/100;
workflow.zoomType = sType;
var figSize = figures.getSize();
for(f = 0;f<figures.getSize();f++){
var fig = figures.get(f);

View File

@@ -11,10 +11,15 @@ bpmnTask = function (_30ab) {
else
this.setDimension(165, 40);
//Setting width and height values as per the zoom ratio
if(typeof workflow.zoomTaskWidth != 'undefined' || typeof workflow.zoomTaskHeight != 'undefined')
this.setDimension(workflow.zoomTaskWidth, workflow.zoomTaskHeight);
this.taskName = ''; //It will set the Default Task Name with appropriate count While dragging a task on the canvas
//Setting width and height values as per the zoom ratio
if(typeof workflow.zoomType != 'undefined')
{
var zoomWidth = 165 * workflow.zoomType;
var zoomHeight = 40 * workflow.zoomType;
this.setDimension(zoomWidth, zoomHeight);
}
this.taskName = ''; //It will set the Default Task Name with appropriate count While dragging a task on the canvas
};
bpmnTask.prototype = new VectorFigure;
@@ -44,12 +49,13 @@ bpmnTask.prototype.paint = function () {
VectorFigure.prototype.paint.call(this);
//Set the Task Limitation
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);
}
// 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);