Updated Zooming Feature and Included class.xpdl.php
This commit is contained in:
@@ -155,7 +155,7 @@ Ext.onReady ( function() {
|
||||
workflow.getCommandStack().redo();
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
xtype: 'tbsplit',
|
||||
text: 'Process',
|
||||
@@ -167,8 +167,8 @@ Ext.onReady ( function() {
|
||||
}
|
||||
},
|
||||
{text: 'Input Document'},{text: 'Output Document'},{text: 'Trigger'},{text: 'Report Table'},{text: 'Database Connection'},{text: 'Cases Scheduler'}]
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
},
|
||||
{
|
||||
text:'Zoom In',
|
||||
@@ -178,19 +178,56 @@ Ext.onReady ( function() {
|
||||
var fig = figures.get(f);
|
||||
var width = fig.getWidth();
|
||||
var height = fig.getHeight();
|
||||
fig.setDimension(width+10,height+10);
|
||||
fig.setDimension(width+20,height+20);
|
||||
if(fig.type == 'bpmnTask')
|
||||
{
|
||||
fig.bpmnText.clear();
|
||||
//len = Math.ceil(this.input.value.length/16);
|
||||
var len = fig.width / 18;
|
||||
if (len >= 6) {
|
||||
// len = 1.5;
|
||||
var padleft = 0.12 * fig.width;
|
||||
var padtop = 0.32 * fig.height - 3;
|
||||
fig.rectWidth = fig.width - 2 * padleft;
|
||||
}
|
||||
else {
|
||||
padleft = 0.1 * fig.width;
|
||||
padtop = 0.09 * fig.height - 3;
|
||||
fig.rectWidth = fig.width - 2 * padleft;
|
||||
}
|
||||
var rectheight = fig.height - 2*padtop;
|
||||
if(typeof fig.size == 'undefined')
|
||||
fig.size = fig.bpmnText.ftSz.substr(0,fig.bpmnText.ftSz.length-2);
|
||||
else
|
||||
fig.size = parseInt(fig.size) + 4;
|
||||
eval("fig.bpmnText.setFont('verdana','"+fig.size+"px', Font.PLAIN)");
|
||||
fig.bpmnText.drawStringRect(fig.taskName, padleft, padtop, fig.rectWidth, rectheight, 'center');
|
||||
fig.bpmnText.paint();
|
||||
}
|
||||
else if(fig.type == 'bpmnAnnotation')
|
||||
{
|
||||
fig.bpmnText.clear();
|
||||
var text = fig.annotationName;
|
||||
len = Math.ceil(text.length/16);
|
||||
if(text.length < 19)
|
||||
{
|
||||
len = 1.5;
|
||||
if(text.length > 9)
|
||||
fig.rectWidth = text.length*8;
|
||||
else
|
||||
fig.rectWidth = 48;
|
||||
}
|
||||
else
|
||||
fig.rectWidth = 150;
|
||||
if(typeof fig.size == 'undefined')
|
||||
fig.size = fig.bpmnText.ftSz.substr(0,fig.bpmnText.ftSz.length-2);
|
||||
else
|
||||
fig.size = parseInt(fig.size) + 4;
|
||||
eval("fig.bpmnText.setFont('verdana','"+fig.size+"px', Font.PLAIN)");
|
||||
fig.bpmnText.drawStringRect(text,20,20,fig.rectWidth,'left');
|
||||
fig.bpmnText.paint();
|
||||
}
|
||||
}
|
||||
// var lines = workflow.getDocument().getLines();
|
||||
// for(l = 0;l<lines.getSize();l++){
|
||||
// var line = lines.get(l);
|
||||
// line.startX += 10;
|
||||
// line.startY += 10;
|
||||
// line.endX += 10;
|
||||
// line.endY += 10;
|
||||
// }
|
||||
|
||||
oZoom = new bpmnZoom();
|
||||
oZoom.increaseFontSize();
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -203,8 +240,7 @@ Ext.onReady ( function() {
|
||||
var height = fig.getHeight();
|
||||
fig.setDimension(width-10,height-10);
|
||||
}
|
||||
oZoom = new bpmnZoom();
|
||||
oZoom.decreaseFontSize();
|
||||
|
||||
}
|
||||
},
|
||||
],
|
||||
@@ -400,7 +436,7 @@ Ext.onReady ( function() {
|
||||
NewShape.x = e.xy[0];
|
||||
NewShape.y = e.xy[1];
|
||||
NewShape.actiontype = 'addTask';
|
||||
|
||||
|
||||
if(data.name == 'bpmnAnnotation')
|
||||
{
|
||||
NewShape.actiontype = 'addText';
|
||||
@@ -412,8 +448,8 @@ Ext.onReady ( function() {
|
||||
workflow.saveShape(NewShape); //Saving Annotations when user drags and drops it
|
||||
NewShape.taskName = workflow.taskName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var scrollLeft = workflow.getScrollLeft();
|
||||
@@ -430,7 +466,7 @@ Ext.onReady ( function() {
|
||||
//var totalgateways = shapes[1].length; //shapes[1] is an array for all the gateways
|
||||
//var totalevents = shapes[2].length; //shapes[2] is an array for all the events
|
||||
var totalroutes = shapes.routes.length; //shapes[3] is an array for all the routes
|
||||
|
||||
|
||||
for(var i=0;i<=totalroutes-1;i++)
|
||||
{
|
||||
var sourceid = shapes.routes[i][1]; //getting source id for connection from Routes array
|
||||
@@ -501,7 +537,7 @@ Ext.onReady ( function() {
|
||||
var shapes = new Array();
|
||||
//var param = new Array();
|
||||
var shapeType = new Array();
|
||||
|
||||
|
||||
for(var i=0; i<=responsearray.length-1;i++)
|
||||
{
|
||||
jsonstring[i] = responsearray[i].split(":");
|
||||
@@ -558,10 +594,10 @@ Ext.onReady ( function() {
|
||||
_4562.workflow.boundaryEvent = true;
|
||||
else
|
||||
_4562.workflow.boundaryEvent = false;
|
||||
|
||||
|
||||
if(k != 0)
|
||||
_4562.workflow.taskNo++;
|
||||
|
||||
|
||||
_4562.workflow.taskName = shapes.tasks[k][1];
|
||||
workflow.task_width = task_width;
|
||||
workflow.task_height = task_height;
|
||||
@@ -736,7 +772,7 @@ Ext.onReady ( function() {
|
||||
annotations[p][6] = this.workflow.figures.data[c].annotationName;
|
||||
p++;
|
||||
}
|
||||
|
||||
|
||||
if(this.workflow.figures.data[c].type.match(/SubProcess/))
|
||||
{
|
||||
subprocess[r] = new Array();
|
||||
|
||||
Reference in New Issue
Block a user