Updated Zooming Feature and Included class.xpdl.php
This commit is contained in:
@@ -866,7 +866,6 @@ Allows to specify the size of the text rectangle and to align the
|
||||
text both horizontally (e.g. right) and vertically within that rectangle */
|
||||
this.drawStringRect = function(txt, x, y, width,height, halign)
|
||||
{
|
||||
this.ftSz = '11px';
|
||||
this.htm += '<div style="position:absolute;overflow:hidden;'+
|
||||
'left:' + x + 'px;'+
|
||||
'top:' + y + 'px;'+
|
||||
|
||||
3883
workflow/engine/classes/class.xpdl.php
Normal file
3883
workflow/engine/classes/class.xpdl.php
Normal file
File diff suppressed because it is too large
Load Diff
@@ -2,8 +2,6 @@
|
||||
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
//$oHeadPublisher->setExtSkin( 'xtheme-gray');
|
||||
$oHeadPublisher->usingExtJs('ux/RowEditor');
|
||||
$oHeadPublisher->addExtJsScript('bpmn/bpmnZoom',true);
|
||||
$oHeadPublisher->addExtJsScript('bpmn/MyWorkflow',true ); //adding a javascript file .js
|
||||
$oHeadPublisher->addExtJsScript('bpmn/pmosExt', true ); //adding a javascript file .js
|
||||
$oHeadPublisher->addExtJsScript('bpmn/TaskContext', true ); //adding a javascript file .js
|
||||
|
||||
@@ -77,17 +77,17 @@ bpmnAnnotation.prototype.paint = function () {
|
||||
*/
|
||||
/* New object is created to implement changing of Text functionality
|
||||
*/
|
||||
var bpmnText = new jsGraphics(this.id);
|
||||
this.bpmnText = new jsGraphics(this.id);
|
||||
var padleft = 0.10*this.getWidth();
|
||||
var padtop = 0.18*this.getHeight();
|
||||
var rectwidth = this.getWidth() - padleft;
|
||||
var rectheight = this.getHeight() - 2*padtop;
|
||||
bpmnText.drawStringRect(this.annotationName,0,padtop,rectwidth,rectheight,'center');
|
||||
this.bpmnText.setFont('verdana', '11px', Font.PLAIN);
|
||||
this.bpmnText.drawStringRect(this.annotationName,0,padtop,rectwidth,rectheight,'center');
|
||||
//bpmnText.drawStringRect(this.taskName,this.getWidth()/2-20,this.getHeight()/2-11,200,'left');
|
||||
//tempcoord = this.coord_converter(this.getWidth(), this.getHeight(), this.taskName.length);
|
||||
//bpmnText.drawTextString(this.taskName, this.getWidth(), this.getHeight(), tempcoord.temp_x, tempcoord.temp_y);
|
||||
bpmnText.paint();
|
||||
this.bpmnNewText = bpmnText;
|
||||
this.bpmnText.paint();
|
||||
|
||||
if(this.input1!=null){
|
||||
this.input1.setPosition(0,this.height/2);
|
||||
@@ -161,7 +161,7 @@ bpmnAnnotation.prototype.onDoubleClick = function () {
|
||||
* The string is first cleared and new string is painted.<br><br>
|
||||
**/
|
||||
bpmnAnnotationDialog.prototype.onOk = function () {
|
||||
this.figure.bpmnNewText.clear();
|
||||
this.figure.bpmnText.clear();
|
||||
|
||||
len = Math.ceil(this.input.value.length/16);
|
||||
if(this.input.value.length < 19)
|
||||
@@ -175,9 +175,9 @@ bpmnAnnotation.prototype.onDoubleClick = function () {
|
||||
else
|
||||
this.figure.rectWidth = 150;
|
||||
//tempcoord = this.workflow.currentSelection.coord_converter(this.workflow.currentSelection.width, this.workflow.currentSelection.height, this.input.value.length)
|
||||
this.figure.bpmnNewText.drawStringRect(this.input.value,20,20,this.figure.rectWidth,'left');
|
||||
this.figure.bpmnText.drawStringRect(this.input.value,20,20,this.figure.rectWidth,'left');
|
||||
// this.figure.bpmnNewText.drawTextString(this.input.value, this.workflow.currentSelection.width, this.workflow.currentSelection.height, tempcoord.temp_x, tempcoord.temp_y);
|
||||
this.figure.bpmnNewText.paint();
|
||||
this.figure.bpmnText.paint();
|
||||
this.figure.annotationName = this.input.value; //Set Updated Text value
|
||||
|
||||
//Updating Annotation Text Async into the DB
|
||||
|
||||
@@ -70,7 +70,7 @@ bpmnTask.prototype.paint = function () {
|
||||
/* Created New Object of jsGraphics to draw String.
|
||||
* New object is created to implement changing of Text functionality
|
||||
*/
|
||||
bpmnText = new jsGraphics(this.id);
|
||||
this.bpmnText = new jsGraphics(this.id);
|
||||
|
||||
/*if(this.taskName.length <= 17)
|
||||
{
|
||||
@@ -101,8 +101,8 @@ bpmnTask.prototype.paint = function () {
|
||||
}
|
||||
|
||||
var rectheight = this.getHeight() - padtop -7;
|
||||
|
||||
bpmnText.drawStringRect(this.taskName, padleft, padtop, this.rectWidth, rectheight, 'center');
|
||||
this.bpmnText.setFont('verdana', '11px', Font.PLAIN);
|
||||
this.bpmnText.drawStringRect(this.taskName, padleft, padtop, this.rectWidth, rectheight, 'center');
|
||||
// tempcoord = this.coord_converter(this.getWidth(), this.getHeight(), this.taskName.length);
|
||||
// bpmnText.drawTextString(this.taskName, this.getWidth(), this.getHeight(), tempcoord.temp_x, tempcoord.temp_y);
|
||||
|
||||
@@ -158,8 +158,8 @@ bpmnTask.prototype.paint = function () {
|
||||
boundaryTimer.paint();
|
||||
/**************************** Drawing Timer Boundary event ends here *******************************/
|
||||
|
||||
bpmnText.paint();
|
||||
this.bpmnNewText = bpmnText;
|
||||
this.bpmnText.paint();
|
||||
//this.bpmnNewText = this.bpmnText;
|
||||
|
||||
/*Code Added to Dynamically shift Ports on resizing of shapes
|
||||
**/
|
||||
@@ -917,7 +917,7 @@ bpmnTask.prototype.trim = function (str) {
|
||||
* The string is first cleared and new string is painted.<br><br>
|
||||
**/
|
||||
bpmnTaskDialog.prototype.onOk = function () {
|
||||
this.figure.bpmnNewText.clear();
|
||||
this.figure.bpmnText.clear();
|
||||
//len = Math.ceil(this.input.value.length/16);
|
||||
var len = this.workflow.currentSelection.width / 18;
|
||||
if (len >= 6) {
|
||||
@@ -952,9 +952,10 @@ bpmnTaskDialog.prototype.onOk = function () {
|
||||
|
||||
|
||||
//tempcoord = this.workflow.currentSelection.coord_converter(this.workflow.currentSelection.width, this.workflow.currentSelection.height, this.input.value.length)
|
||||
this.figure.bpmnNewText.drawStringRect(this.input.value, padleft, padtop, this.figure.rectWidth, rectheight, 'center');
|
||||
this.figure.bpmnText.setFont('verdana', '11px', Font.PLAIN);
|
||||
this.figure.bpmnText.drawStringRect(this.input.value, padleft, padtop, this.figure.rectWidth, rectheight, 'center');
|
||||
// this.figure.bpmnNewText.drawTextString(this.input.value, this.workflow.currentSelection.width, this.workflow.currentSelection.height, tempcoord.temp_x, tempcoord.temp_y);
|
||||
this.figure.bpmnNewText.paint();
|
||||
this.figure.bpmnText.paint();
|
||||
this.workflow.currentSelection.taskName = this.input.value; //Set Updated Text value
|
||||
//Saving task name (whenever updated) onAsynch AJAX call
|
||||
this.figure.actiontype = 'updateTaskName';
|
||||
|
||||
@@ -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();
|
||||
|
||||
}
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user