moved port zooming code from bpmnShapes.js to draw2d
This commit is contained in:
@@ -1661,13 +1661,16 @@ Oval.prototype.type="Oval";
|
|||||||
Oval.prototype.paint=function(){
|
Oval.prototype.paint=function(){
|
||||||
VectorFigure.prototype.paint.call(this);
|
VectorFigure.prototype.paint.call(this);
|
||||||
this.graphics.setStroke(this.stroke);
|
this.graphics.setStroke(this.stroke);
|
||||||
|
var zoomfactor=1;
|
||||||
|
if(typeof workflow.zoomfactor != 'undefined' && workflow.zoomfactor != '')
|
||||||
|
zoomfactor = workflow.zoomfactor;
|
||||||
if(this.bgColor!=null){
|
if(this.bgColor!=null){
|
||||||
this.graphics.setColor(this.bgColor.getHTMLStyle());
|
this.graphics.setColor(this.bgColor.getHTMLStyle());
|
||||||
this.graphics.fillOval(0,0,this.getWidth()+2,this.getHeight()+2);
|
this.graphics.fillOval(0,0,(this.getWidth()+2)*zoomfactor,(this.getHeight()+2)*zoomfactor);
|
||||||
}
|
}
|
||||||
if(this.lineColor!=null){
|
if(this.lineColor!=null){
|
||||||
this.graphics.setColor(this.lineColor.getHTMLStyle());
|
this.graphics.setColor(this.lineColor.getHTMLStyle());
|
||||||
this.graphics.drawOval(0,0,this.getWidth()+2,this.getHeight()+2);
|
this.graphics.drawOval(0,0,(this.getWidth()+2)*zoomfactor,(this.getHeight()+2)*zoomfactor);
|
||||||
}
|
}
|
||||||
this.graphics.paint();
|
this.graphics.paint();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -624,17 +624,7 @@ FlowMenu.prototype.onOtherFigureMoved = function (_39fd) {
|
|||||||
//Get the workflow object of the selected Figure object, so that we can compare with the new selected figure to remove ports
|
//Get the workflow object of the selected Figure object, so that we can compare with the new selected figure to remove ports
|
||||||
_39fd.workflow.preSelectedFigure = _39fd.workflow.currentSelection;
|
_39fd.workflow.preSelectedFigure = _39fd.workflow.currentSelection;
|
||||||
var countConn = 0;
|
var countConn = 0;
|
||||||
//Get all the ports of the shapes and resize according to zoom
|
//workflow.setBoundary(workflow.currentSelection);
|
||||||
var ports = _39fd.workflow.currentSelection.getPorts();
|
|
||||||
var len =ports.data.length;
|
|
||||||
for(var i=0; i<=len; i++){
|
|
||||||
if(typeof ports.data[i] === 'object'){
|
|
||||||
var port = ports.data[i];
|
|
||||||
port.setDimension(10*workflow.zoomfactor,10*workflow.zoomfactor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//workflow.setBoundary(workflow.currentSelection);
|
|
||||||
|
|
||||||
//Preventing Task from drawing outside canvas Code Ends here
|
//Preventing Task from drawing outside canvas Code Ends here
|
||||||
if (_39fd.type == 'DecoratedConnection' || _39fd.workflow.contextClicked == true) {
|
if (_39fd.type == 'DecoratedConnection' || _39fd.workflow.contextClicked == true) {
|
||||||
|
|||||||
Reference in New Issue
Block a user