|
@@ -1610,7 +1610,7 @@ Sidebar.prototype.addBpmnPalette = function(dir, expand)
|
|
|
var cell = new mxCell('Sub-Process', new mxGeometry(0, 0, 120, 80), 'html=1;whiteSpace=wrap;rounded=1;');
|
|
|
cell.vertex = true;
|
|
|
|
|
|
- var cell1 = new mxCell('', new mxGeometry(0.5, 1, 14, 14), 'html=1;shape=plus;');
|
|
|
+ var cell1 = new mxCell('', new mxGeometry(0.5, 1, 14, 14), 'html=1;shape=plus;outlineConnect=0;');
|
|
|
cell1.vertex = true;
|
|
|
cell1.geometry.relative = true;
|
|
|
cell1.geometry.offset = new mxPoint(-7, -14);
|
|
@@ -1623,7 +1623,7 @@ Sidebar.prototype.addBpmnPalette = function(dir, expand)
|
|
|
var cell = new mxCell('Looped\nSub-Process', new mxGeometry(0, 0, 120, 80), 'html=1;whiteSpace=wrap;rounded=1');
|
|
|
cell.vertex = true;
|
|
|
|
|
|
- var cell1 = new mxCell('', new mxGeometry(0.5, 1, 14, 14), 'html=1;shape=mxgraph.bpmn.loop;');
|
|
|
+ var cell1 = new mxCell('', new mxGeometry(0.5, 1, 14, 14), 'html=1;shape=mxgraph.bpmn.loop;outlineConnect=0;');
|
|
|
cell1.vertex = true;
|
|
|
cell1.geometry.relative = true;
|
|
|
cell1.geometry.offset = new mxPoint(-15, -14);
|
|
@@ -1642,7 +1642,7 @@ Sidebar.prototype.addBpmnPalette = function(dir, expand)
|
|
|
var cell = new mxCell('Receive', new mxGeometry(0, 0, 120, 80), 'html=1;whiteSpace=wrap;rounded=1;');
|
|
|
cell.vertex = true;
|
|
|
|
|
|
- var cell1 = new mxCell('', new mxGeometry(0, 0, 20, 14), 'html=1;shape=message;');
|
|
|
+ var cell1 = new mxCell('', new mxGeometry(0, 0, 20, 14), 'html=1;shape=message;outlineConnect=0;');
|
|
|
cell1.vertex = true;
|
|
|
cell1.geometry.relative = true;
|
|
|
cell1.geometry.offset = new mxPoint(7, 7);
|
|
@@ -1655,13 +1655,13 @@ Sidebar.prototype.addBpmnPalette = function(dir, expand)
|
|
|
var cell = new mxCell('User', new mxGeometry(0, 0, 120, 80), 'html=1;whiteSpace=wrap;rounded=1;');
|
|
|
cell.vertex = true;
|
|
|
|
|
|
- var cell1 = new mxCell('', new mxGeometry(0, 0, 14, 14), 'html=1;shape=mxgraph.bpmn.user_task;');
|
|
|
+ var cell1 = new mxCell('', new mxGeometry(0, 0, 14, 14), 'html=1;shape=mxgraph.bpmn.user_task;outlineConnect=0;');
|
|
|
cell1.vertex = true;
|
|
|
cell1.geometry.relative = true;
|
|
|
cell1.geometry.offset = new mxPoint(7, 7);
|
|
|
cell.insert(cell1);
|
|
|
|
|
|
- var cell2 = new mxCell('', new mxGeometry(0.5, 1, 14, 14), 'html=1;shape=plus;');
|
|
|
+ var cell2 = new mxCell('', new mxGeometry(0.5, 1, 14, 14), 'html=1;shape=plus;outlineConnect=0;');
|
|
|
cell2.vertex = true;
|
|
|
cell2.geometry.relative = true;
|
|
|
cell2.geometry.offset = new mxPoint(-7, -14);
|
|
@@ -1674,7 +1674,7 @@ Sidebar.prototype.addBpmnPalette = function(dir, expand)
|
|
|
var cell = new mxCell('Process', new mxGeometry(0, 0, 120, 80), 'html=1;whiteSpace=wrap;rounded=1;');
|
|
|
cell.vertex = true;
|
|
|
|
|
|
- var cell1 = new mxCell('', new mxGeometry(1, 1, 30, 30), 'shape=mxgraph.bpmn.timer_start;perimeter=ellipsePerimeter;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;');
|
|
|
+ var cell1 = new mxCell('', new mxGeometry(1, 1, 30, 30), 'shape=mxgraph.bpmn.timer_start;perimeter=ellipsePerimeter;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;outlineConnect=0;');
|
|
|
cell1.vertex = true;
|
|
|
cell1.geometry.relative = true;
|
|
|
cell1.geometry.offset = new mxPoint(-40, -15);
|
|
@@ -1687,7 +1687,7 @@ Sidebar.prototype.addBpmnPalette = function(dir, expand)
|
|
|
var cell = new mxCell('Process', new mxGeometry(0, 0, 120, 80), 'html=1;whiteSpace=wrap;rounded=1;');
|
|
|
cell.vertex = true;
|
|
|
|
|
|
- var cell1 = new mxCell('', new mxGeometry(1, 0, 30, 30), 'shape=mxgraph.bpmn.timer_start;perimeter=ellipsePerimeter;html=1;labelPosition=right;labelBackgroundColor=#ffffff;align=left;');
|
|
|
+ var cell1 = new mxCell('', new mxGeometry(1, 0, 30, 30), 'shape=mxgraph.bpmn.timer_start;perimeter=ellipsePerimeter;html=1;labelPosition=right;labelBackgroundColor=#ffffff;align=left;outlineConnect=0;');
|
|
|
cell1.vertex = true;
|
|
|
cell1.geometry.relative = true;
|
|
|
cell1.geometry.offset = new mxPoint(-15, 10);
|
|
@@ -1697,11 +1697,11 @@ Sidebar.prototype.addBpmnPalette = function(dir, expand)
|
|
|
}),
|
|
|
this.createVertexTemplateEntry('swimlane;html=1;horizontal=0;startSize=20;', 320, 240, 'Pool', 'Pool', null, null, 'bpmn pool'),
|
|
|
this.createVertexTemplateEntry('swimlane;html=1;horizontal=0;swimlaneFillColor=white;swimlaneLine=0;', 300, 120, 'Lane', 'Lane', null, null, 'bpmn lane'),
|
|
|
- this.createVertexTemplateEntry('shape=hexagon;html=1;whiteSpace=wrap;perimeter=hexagonPerimeter;', 60, 50, '', 'Conversation', null, null, 'bpmn conversation'),
|
|
|
- this.createVertexTemplateEntry('shape=hexagon;html=1;whiteSpace=wrap;perimeter=hexagonPerimeter;strokeWidth=4', 60, 50, '', 'Call Conversation', null, null, 'bpmn call conversation'),
|
|
|
+ this.createVertexTemplateEntry('shape=hexagon;html=1;whiteSpace=wrap;perimeter=hexagonPerimeter;rounded=0;', 60, 50, '', 'Conversation', null, null, 'bpmn conversation'),
|
|
|
+ this.createVertexTemplateEntry('shape=hexagon;html=1;whiteSpace=wrap;perimeter=hexagonPerimeter;strokeWidth=4;rounded=0;', 60, 50, '', 'Call Conversation', null, null, 'bpmn call conversation'),
|
|
|
this.addEntry('bpmn subconversation sub conversation sub-conversation', function()
|
|
|
{
|
|
|
- var cell = new mxCell('', new mxGeometry(0, 0, 60, 50), 'shape=hexagon;whiteSpace=wrap;html=1;perimeter=hexagonPerimeter;');
|
|
|
+ var cell = new mxCell('', new mxGeometry(0, 0, 60, 50), 'shape=hexagon;whiteSpace=wrap;html=1;perimeter=hexagonPerimeter;rounded=0;');
|
|
|
cell.vertex = true;
|
|
|
|
|
|
var cell1 = new mxCell('', new mxGeometry(0.5, 1, 14, 14), 'html=1;shape=plus;');
|
|
@@ -1717,13 +1717,13 @@ Sidebar.prototype.addBpmnPalette = function(dir, expand)
|
|
|
var cell = new mxCell('', new mxGeometry(0, 0, 40, 60), 'shape=note;whiteSpace=wrap;size=16;html=1;');
|
|
|
cell.vertex = true;
|
|
|
|
|
|
- var cell1 = new mxCell('', new mxGeometry(0, 0, 14, 14), 'html=1;shape=singleArrow;arrowWidth=0.4;arrowSize=0.4;');
|
|
|
+ var cell1 = new mxCell('', new mxGeometry(0, 0, 14, 14), 'html=1;shape=singleArrow;arrowWidth=0.4;arrowSize=0.4;outlineConnect=0;');
|
|
|
cell1.vertex = true;
|
|
|
cell1.geometry.relative = true;
|
|
|
cell1.geometry.offset = new mxPoint(2, 2);
|
|
|
cell.insert(cell1);
|
|
|
|
|
|
- var cell2 = new mxCell('', new mxGeometry(0.5, 1, 14, 14), 'html=1;whiteSpace=wrap;shape=parallelMarker;');
|
|
|
+ var cell2 = new mxCell('', new mxGeometry(0.5, 1, 14, 14), 'html=1;whiteSpace=wrap;shape=parallelMarker;outlineConnect=0;');
|
|
|
cell2.vertex = true;
|
|
|
cell2.geometry.relative = true;
|
|
|
cell2.geometry.offset = new mxPoint(-7, -14);
|
|
@@ -1732,19 +1732,19 @@ Sidebar.prototype.addBpmnPalette = function(dir, expand)
|
|
|
return sb.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'Data Object');
|
|
|
}),
|
|
|
this.createVertexTemplateEntry('shape=datastore;whiteSpace=wrap;html=1;', 60, 60, '', 'Data Store', null, null, 'bpmn data store'),
|
|
|
- this.createVertexTemplateEntry('shape=plus;html=1;', 14, 14, '', 'Sub-Process Marker', null, null, 'bpmn subprocess sub process sub-process marker'),
|
|
|
- this.createVertexTemplateEntry('shape=mxgraph.bpmn.loop;html=1;', 14, 14, '', 'Loop Marker', null, null, 'bpmn loop marker'),
|
|
|
- this.createVertexTemplateEntry('shape=parallelMarker;html=1;', 14, 14, '', 'Parallel MI Marker', null, null, 'bpmn parallel mi marker'),
|
|
|
- this.createVertexTemplateEntry('shape=parallelMarker;direction=south;html=1;', 14, 14, '', 'Sequential MI Marker', null, null, 'bpmn sequential mi marker'),
|
|
|
- this.createVertexTemplateEntry('shape=mxgraph.bpmn.ad_hoc;fillColor=#000000;html=1;', 14, 14, '', 'Ad Hoc Marker', null, null, 'bpmn ad hoc marker'),
|
|
|
- this.createVertexTemplateEntry('shape=mxgraph.bpmn.compensation;html=1;', 14, 14, '', 'Compensation Marker', null, null, 'bpmn compensation marker'),
|
|
|
- this.createVertexTemplateEntry('shape=message;whiteSpace=wrap;html=1;fillColor=#000000;strokeColor=#ffffff;strokeWidth=2;', 40, 30, '', 'Send Task', null, null, 'bpmn send task'),
|
|
|
- this.createVertexTemplateEntry('shape=message;whiteSpace=wrap;html=1;', 40, 30, '', 'Receive Task', null, null, 'bpmn receive task'),
|
|
|
- this.createVertexTemplateEntry('shape=mxgraph.bpmn.user_task;html=1;', 14, 14, '', 'User Task', null, null, this.getTagsForStencil('mxgraph.bpmn', 'user_task').join(' ')),
|
|
|
- this.createVertexTemplateEntry('shape=mxgraph.bpmn.manual_task;html=1;', 14, 14, '', 'Manual Task', null, null, this.getTagsForStencil('mxgraph.bpmn', 'user_task').join(' ')),
|
|
|
- this.createVertexTemplateEntry('shape=mxgraph.bpmn.business_rule_task;html=1;', 14, 14, '', 'Business Rule Task', null, null, this.getTagsForStencil('mxgraph.bpmn', 'business_rule_task').join(' ')),
|
|
|
- this.createVertexTemplateEntry('shape=mxgraph.bpmn.service_task;html=1;', 14, 14, '', 'Service Task', null, null, this.getTagsForStencil('mxgraph.bpmn', 'service_task').join(' ')),
|
|
|
- this.createVertexTemplateEntry('shape=mxgraph.bpmn.script_task;html=1;', 14, 14, '', 'Script Task', null, null, this.getTagsForStencil('mxgraph.bpmn', 'script_task').join(' ')),
|
|
|
+ this.createVertexTemplateEntry('shape=plus;html=1;outlineConnect=0;', 14, 14, '', 'Sub-Process Marker', null, null, 'bpmn subprocess sub process sub-process marker'),
|
|
|
+ this.createVertexTemplateEntry('shape=mxgraph.bpmn.loop;html=1;outlineConnect=0;', 14, 14, '', 'Loop Marker', null, null, 'bpmn loop marker'),
|
|
|
+ this.createVertexTemplateEntry('shape=parallelMarker;html=1;outlineConnect=0;', 14, 14, '', 'Parallel MI Marker', null, null, 'bpmn parallel mi marker'),
|
|
|
+ this.createVertexTemplateEntry('shape=parallelMarker;direction=south;html=1;outlineConnect=0;', 14, 14, '', 'Sequential MI Marker', null, null, 'bpmn sequential mi marker'),
|
|
|
+ this.createVertexTemplateEntry('shape=mxgraph.bpmn.ad_hoc;fillColor=#000000;html=1;outlineConnect=0;', 14, 14, '', 'Ad Hoc Marker', null, null, 'bpmn ad hoc marker'),
|
|
|
+ this.createVertexTemplateEntry('shape=mxgraph.bpmn.compensation;html=1;outlineConnect=0;', 14, 14, '', 'Compensation Marker', null, null, 'bpmn compensation marker'),
|
|
|
+ this.createVertexTemplateEntry('shape=message;whiteSpace=wrap;html=1;outlineConnect=0;fillColor=#000000;strokeColor=#ffffff;strokeWidth=2;', 40, 30, '', 'Send Task', null, null, 'bpmn send task'),
|
|
|
+ this.createVertexTemplateEntry('shape=message;whiteSpace=wrap;html=1;outlineConnect=0;', 40, 30, '', 'Receive Task', null, null, 'bpmn receive task'),
|
|
|
+ this.createVertexTemplateEntry('shape=mxgraph.bpmn.user_task;html=1;outlineConnect=0;', 14, 14, '', 'User Task', null, null, this.getTagsForStencil('mxgraph.bpmn', 'user_task').join(' ')),
|
|
|
+ this.createVertexTemplateEntry('shape=mxgraph.bpmn.manual_task;html=1;outlineConnect=0;', 14, 14, '', 'Manual Task', null, null, this.getTagsForStencil('mxgraph.bpmn', 'user_task').join(' ')),
|
|
|
+ this.createVertexTemplateEntry('shape=mxgraph.bpmn.business_rule_task;html=1;outlineConnect=0;', 14, 14, '', 'Business Rule Task', null, null, this.getTagsForStencil('mxgraph.bpmn', 'business_rule_task').join(' ')),
|
|
|
+ this.createVertexTemplateEntry('shape=mxgraph.bpmn.service_task;html=1;outlineConnect=0;', 14, 14, '', 'Service Task', null, null, this.getTagsForStencil('mxgraph.bpmn', 'service_task').join(' ')),
|
|
|
+ this.createVertexTemplateEntry('shape=mxgraph.bpmn.script_task;html=1;outlineConnect=0;', 14, 14, '', 'Script Task', null, null, this.getTagsForStencil('mxgraph.bpmn', 'script_task').join(' ')),
|
|
|
this.createVertexTemplateEntry('html=1;shape=mxgraph.flowchart.annotation_2;align=left;', 50, 100, '', 'Annotation', null, null, this.getTagsForStencil('bpmn', 'annotation_1', 'bpmn business process model ').join(' ')),
|
|
|
this.createVertexTemplateEntry('rounded=1;arcSize=10;dashed=1;strokeColor=#000000;fillColor=none;gradientColor=none;dashPattern=8 3 1 3;strokeWidth=2;',
|
|
|
200, 200, '', 'Group', null, null, this.getTagsForStencil('bpmn', 'group', 'bpmn business process model ').join(' ')),
|
|
@@ -1760,9 +1760,8 @@ Sidebar.prototype.addBpmnPalette = function(dir, expand)
|
|
|
edge.geometry.relative = true;
|
|
|
edge.edge = true;
|
|
|
|
|
|
- var cell = new mxCell('', new mxGeometry(0, 0, 20, 14), 'shape=message;html=1;');
|
|
|
+ var cell = new mxCell('', new mxGeometry(0, 0, 20, 14), 'shape=message;html=1;outlineConnect=0;');
|
|
|
cell.geometry.relative = true;
|
|
|
- cell.setConnectable(false);
|
|
|
cell.vertex = true;
|
|
|
cell.geometry.offset = new mxPoint(-10, -7);
|
|
|
edge.insert(cell);
|
|
@@ -2015,9 +2014,18 @@ Sidebar.prototype.createDropHandler = function(cells, allowSplit, allowCellsInse
|
|
|
{
|
|
|
allowCellsInserted = (allowCellsInserted != null) ? allowCellsInserted : true;
|
|
|
|
|
|
- return mxUtils.bind(this, function(graph, evt, target, x, y)
|
|
|
+ return mxUtils.bind(this, function(graph, evt, target, x, y, force)
|
|
|
{
|
|
|
- if (graph.isEnabled())
|
|
|
+ var elt = (force) ? null : ((mxEvent.isTouchEvent(evt) || mxEvent.isPenEvent(evt)) ?
|
|
|
+ document.elementFromPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt)) :
|
|
|
+ mxEvent.getSource(evt));
|
|
|
+
|
|
|
+ while (elt != null && elt != this.container)
|
|
|
+ {
|
|
|
+ elt = elt.parentNode;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (elt == null && graph.isEnabled())
|
|
|
{
|
|
|
cells = graph.getImportableCells(cells);
|
|
|
|
|
@@ -2090,6 +2098,15 @@ Sidebar.prototype.createDropHandler = function(cells, allowSplit, allowCellsInse
|
|
|
graph.scrollCellToVisible(select[0]);
|
|
|
graph.setSelectionCells(select);
|
|
|
}
|
|
|
+
|
|
|
+ if (graph.editAfterInsert && evt != null && mxEvent.isMouseEvent(evt) &&
|
|
|
+ select != null && select.length == 1)
|
|
|
+ {
|
|
|
+ window.setTimeout(function()
|
|
|
+ {
|
|
|
+ graph.startEditing(select[0]);
|
|
|
+ }, 0);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -2114,7 +2131,7 @@ Sidebar.prototype.createDragPreview = function(width, height)
|
|
|
/**
|
|
|
* Creates a drag source for the given element.
|
|
|
*/
|
|
|
-Sidebar.prototype.dropAndConnect = function(source, targets, direction, dropCellIndex)
|
|
|
+Sidebar.prototype.dropAndConnect = function(source, targets, direction, dropCellIndex, evt)
|
|
|
{
|
|
|
var geo = this.getDropAndConnectGeometry(source, targets[dropCellIndex], direction, targets);
|
|
|
|
|
@@ -2124,6 +2141,7 @@ Sidebar.prototype.dropAndConnect = function(source, targets, direction, dropCell
|
|
|
if (geo != null)
|
|
|
{
|
|
|
var graph = this.editorUi.editor.graph;
|
|
|
+ var editingCell = null;
|
|
|
|
|
|
graph.model.beginUpdate();
|
|
|
try
|
|
@@ -2218,6 +2236,7 @@ Sidebar.prototype.dropAndConnect = function(source, targets, direction, dropCell
|
|
|
graph.model.setGeometry(targets[dropCellIndex], geo);
|
|
|
graph.cellsMoved(targets, dx, dy, null, null, true);
|
|
|
tmp = targets.slice();
|
|
|
+ editingCell = (tmp.length == 1) ? tmp[0] : null;
|
|
|
targets.push(graph.insertEdge(null, null, '', source, targets[dropCellIndex],
|
|
|
graph.createCurrentEdgeStyle()));
|
|
|
}
|
|
@@ -2228,6 +2247,15 @@ Sidebar.prototype.dropAndConnect = function(source, targets, direction, dropCell
|
|
|
{
|
|
|
graph.model.endUpdate();
|
|
|
}
|
|
|
+
|
|
|
+ if (graph.editAfterInsert && evt != null && mxEvent.isMouseEvent(evt) &&
|
|
|
+ editingCell != null)
|
|
|
+ {
|
|
|
+ window.setTimeout(function()
|
|
|
+ {
|
|
|
+ graph.startEditing(editingCell);
|
|
|
+ }, 0);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
return tmp;
|
|
@@ -2431,7 +2459,7 @@ Sidebar.prototype.createDragSource = function(elt, dropHandler, preview, cells,
|
|
|
else if (cells != null && activeArrow != null && currentTargetState != null && activeArrow != styleTarget)
|
|
|
{
|
|
|
var index = (graph.model.isEdge(currentTargetState.cell) || freeSourceEdge == null) ? firstVertex : freeSourceEdge;
|
|
|
- graph.setSelectionCells(this.dropAndConnect(currentTargetState.cell, cells, direction, index));
|
|
|
+ graph.setSelectionCells(this.dropAndConnect(currentTargetState.cell, cells, direction, index, evt));
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -3081,6 +3109,7 @@ Sidebar.prototype.createDragSource = function(elt, dropHandler, preview, cells,
|
|
|
Sidebar.prototype.itemClicked = function(cells, ds, evt, elt)
|
|
|
{
|
|
|
var graph = this.editorUi.editor.graph;
|
|
|
+ graph.container.focus();
|
|
|
|
|
|
// Alt+Click inserts and connects
|
|
|
if (mxEvent.isAltDown(evt))
|
|
@@ -3101,7 +3130,8 @@ Sidebar.prototype.itemClicked = function(cells, ds, evt, elt)
|
|
|
{
|
|
|
graph.setSelectionCells(this.dropAndConnect(graph.getSelectionCell(), cells, (mxEvent.isMetaDown(evt) || mxEvent.isControlDown(evt)) ?
|
|
|
(mxEvent.isShiftDown(evt) ? mxConstants.DIRECTION_WEST : mxConstants.DIRECTION_NORTH) :
|
|
|
- (mxEvent.isShiftDown(evt) ? mxConstants.DIRECTION_EAST : mxConstants.DIRECTION_SOUTH), firstVertex));
|
|
|
+ (mxEvent.isShiftDown(evt) ? mxConstants.DIRECTION_EAST : mxConstants.DIRECTION_SOUTH),
|
|
|
+ firstVertex, evt));
|
|
|
graph.scrollCellToVisible(graph.getSelectionCell());
|
|
|
}
|
|
|
}
|
|
@@ -3115,7 +3145,7 @@ Sidebar.prototype.itemClicked = function(cells, ds, evt, elt)
|
|
|
else
|
|
|
{
|
|
|
var pt = graph.getFreeInsertPoint();
|
|
|
- ds.drop(graph, evt, null, pt.x, pt.y);
|
|
|
+ ds.drop(graph, evt, null, pt.x, pt.y, true);
|
|
|
|
|
|
if (this.editorUi.hoverIcons != null && (mxEvent.isTouchEvent(evt) || mxEvent.isPenEvent(evt)))
|
|
|
{
|