Adding task with same dimension when zoomed...maitaining zoom dimension
This commit is contained in:
@@ -10,6 +10,14 @@ bpmnAnnotation = function (_30ab ) {
|
|||||||
if(typeof workflow.zoomAnnotationWidth != 'undefined' || typeof workflow.zoomAnnotationHeight != 'undefined')
|
if(typeof workflow.zoomAnnotationWidth != 'undefined' || typeof workflow.zoomAnnotationHeight != 'undefined')
|
||||||
this.setDimension(workflow.zoomAnnotationWidth, workflow.zoomAnnotationHeight);
|
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
|
this.setAnnotationName(_30ab.annotationName); //It will set the Default Task Name with appropriate count While dragging a task on the canvas
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,14 @@ if(typeof workflow.zoomWidth != 'undefined' || typeof workflow.zoomHeight != 'un
|
|||||||
this.setDimension(workflow.zoomWidth, workflow.zoomHeight);
|
this.setDimension(workflow.zoomWidth, workflow.zoomHeight);
|
||||||
else
|
else
|
||||||
this.setDimension(30,30);
|
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;
|
this.stroke=3;
|
||||||
};
|
};
|
||||||
bpmnEventEmptyEnd.prototype=new VectorFigure;
|
bpmnEventEmptyEnd.prototype=new VectorFigure;
|
||||||
|
|||||||
@@ -5,6 +5,14 @@ if(typeof workflow.zoomWidth != 'undefined' || typeof workflow.zoomHeight != 'un
|
|||||||
this.setDimension(workflow.zoomWidth, workflow.zoomHeight);
|
this.setDimension(workflow.zoomWidth, workflow.zoomHeight);
|
||||||
else
|
else
|
||||||
this.setDimension(30,30);
|
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;
|
this.stroke=2;
|
||||||
};
|
};
|
||||||
bpmnEventEmptyStart.prototype=new VectorFigure;
|
bpmnEventEmptyStart.prototype=new VectorFigure;
|
||||||
|
|||||||
@@ -5,6 +5,14 @@ if(typeof workflow.zoomWidth != 'undefined' || typeof workflow.zoomHeight != 'un
|
|||||||
this.setDimension(workflow.zoomWidth+10, workflow.zoomHeight+10);
|
this.setDimension(workflow.zoomWidth+10, workflow.zoomHeight+10);
|
||||||
else
|
else
|
||||||
this.setDimension(40,40);
|
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;
|
this.stroke=2;
|
||||||
};
|
};
|
||||||
bpmnGatewayComplex.prototype=new VectorFigure;
|
bpmnGatewayComplex.prototype=new VectorFigure;
|
||||||
|
|||||||
@@ -1770,6 +1770,7 @@ MyWorkflow.prototype.zoom = function(sType)
|
|||||||
|
|
||||||
|
|
||||||
sType =sType/100;
|
sType =sType/100;
|
||||||
|
workflow.zoomType = sType;
|
||||||
var figSize = figures.getSize();
|
var figSize = figures.getSize();
|
||||||
for(f = 0;f<figures.getSize();f++){
|
for(f = 0;f<figures.getSize();f++){
|
||||||
var fig = figures.get(f);
|
var fig = figures.get(f);
|
||||||
|
|||||||
@@ -12,8 +12,13 @@ bpmnTask = function (_30ab) {
|
|||||||
this.setDimension(165, 40);
|
this.setDimension(165, 40);
|
||||||
|
|
||||||
//Setting width and height values as per the zoom ratio
|
//Setting width and height values as per the zoom ratio
|
||||||
if(typeof workflow.zoomTaskWidth != 'undefined' || typeof workflow.zoomTaskHeight != 'undefined')
|
if(typeof workflow.zoomType != 'undefined')
|
||||||
this.setDimension(workflow.zoomTaskWidth, workflow.zoomTaskHeight);
|
{
|
||||||
|
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
|
this.taskName = ''; //It will set the Default Task Name with appropriate count While dragging a task on the canvas
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -44,12 +49,13 @@ bpmnTask.prototype.paint = function () {
|
|||||||
VectorFigure.prototype.paint.call(this);
|
VectorFigure.prototype.paint.call(this);
|
||||||
|
|
||||||
//Set the Task Limitation
|
//Set the Task Limitation
|
||||||
if ((this.getWidth() > 200 || this.getHeight() > 100 ) && this.limitFlag != true) {
|
// if ((this.getWidth() > 200 || this.getHeight() > 100 ) && this.limitFlag != true) {
|
||||||
this.setDimension(200, 100);
|
// this.setDimension(200, 100);
|
||||||
}
|
// }
|
||||||
else if ((this.getWidth() < 165 || this.getHeight() < 40) && this.limitFlag != true) {
|
// else if ((this.getWidth() < 165 || this.getHeight() < 40) && this.limitFlag != true) {
|
||||||
this.setDimension(165, 40);
|
// this.setDimension(165, 40);
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
var x = new Array(6, this.getWidth() - 3, this.getWidth(), this.getWidth(), this.getWidth() - 3, 6, 3, 3, 6);
|
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);
|
var y = new Array(3, 3, 6, this.getHeight() - 3, this.getHeight(), this.getHeight(), this.getHeight() - 3, 6, 3);
|
||||||
|
|||||||
Reference in New Issue
Block a user