Lines Matching +full:add +full:- +full:matcher

2  * bpmn-js - bpmn-modeler v8.8.2
4 * Copyright (c) 2014-present, camunda Services GmbH
9 * Source Code: https://github.com/bpmn-io/bpmn-js
11 * Date: 2021-10-20
68 var rem = digits - Math.floor(digits);
284 * @param {Function|Object} matcher
289 function find(collection, matcher) { argument
290 matcher = toMatcher(matcher);
293 if (matcher(val, key)) {
304 * @param {Function} matcher
309 function findIndex(collection, matcher) { argument
310 matcher = toMatcher(matcher);
311 var idx = isArray$2(collection) ? -1 : undefined;
313 if (matcher(val, key)) {
324 * @param {Function} matcher
329 function filter(collection, matcher) { argument
332 if (matcher(val, key)) {
340 * (non-undefined) will stop iteration.
372 * @param {Function} matcher
377 function without(arr, matcher) { argument
383 matcher = toMatcher(matcher);
385 return !matcher(el, idx);
409 * @param {Function} matcher
414 function every(collection, matcher) { argument
416 return matches && matcher(val, key);
424 * @param {Function} matcher
429 function some(collection, matcher) { argument
430 return !!find(collection, matcher);
512 …for (var _len = arguments.length, collections = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key…
513 collections[_key - 1] = arguments[_key];
561 * Create an object pattern matcher.
565 * const matcher = matchPattern({ id: 1 });
567 * var element = find(elements, matcher);
588 function toMatcher(matcher) { argument
589 return isFunction(matcher) ? matcher : function (e) {
590 return e === matcher;
619 var scheduledDiff = lastNow + timeout - now;
689 …for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _l…
690 others[_key - 1] = arguments[_key];
727 if (properties.indexOf(key) === -1) {
766 return -1;
815 * Add class `name` if not already present.
822 ClassList$1.prototype.add = function (name) {
825 this.list.add(name);
914 this.add(name);
920 this.add(name);
1084 if (forceCaptureEvents.indexOf(type) !== -1) {
1107 if (forceCaptureEvents.indexOf(type) !== -1) {
1149 // for script/link/style tags to work in IE6-8, you have to wrap
1150 // in a div with a non-whitespace character in front, ha!
1181 * @param {String} html - HTML string to "domify"
1182 * @param {Document} doc - The `document` instance to create the Node for
1215 while (depth--) el = el.lastChild;
1301 'alignment-baseline': 1,
1302 'baseline-shift': 1,
1304 'clip-path': 1,
1305 'clip-rule': 1,
1307 'color-interpolation': 1,
1308 'color-interpolation-filters': 1,
1309 'color-profile': 1,
1310 'color-rendering': 1,
1314 'dominant-baseline': 1,
1315 'enable-background': 1,
1317 'fill-opacity': 1,
1318 'fill-rule': 1,
1320 'flood-color': 1,
1321 'flood-opacity': 1,
1323 'font-family': 1,
1324 'font-size': LENGTH_ATTR,
1325 'font-size-adjust': 1,
1326 'font-stretch': 1,
1327 'font-style': 1,
1328 'font-variant': 1,
1329 'font-weight': 1,
1330 'glyph-orientation-horizontal': 1,
1331 'glyph-orientation-vertical': 1,
1332 'image-rendering': 1,
1334 'letter-spacing': 1,
1335 'lighting-color': 1,
1337 'marker-end': 1,
1338 'marker-mid': 1,
1339 'marker-start': 1,
1343 'pointer-events': 1,
1344 'shape-rendering': 1,
1345 'stop-color': 1,
1346 'stop-opacity': 1,
1348 'stroke-dasharray': 1,
1349 'stroke-dashoffset': 1,
1350 'stroke-linecap': 1,
1351 'stroke-linejoin': 1,
1352 'stroke-miterlimit': 1,
1353 'stroke-opacity': 1,
1354 'stroke-width': LENGTH_ATTR,
1355 'text-anchor': 1,
1356 'text-decoration': 1,
1357 'text-rendering': 1,
1358 'unicode-bidi': 1,
1360 'word-spacing': 1,
1361 'writing-mode': 1
1374 var hyphenated = name.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
1438 return -1;
1470 * Add class `name` if not already present.
1477 ClassList.prototype.add = function(name) {
1481 this.list.add(name);
1580 this.add(name);
1586 this.add(name);
1677 if (svg.indexOf(ns.svg) === -1) {
1860 output.push('<!--', escape$1(node.nodeValue, TEXT_ENTITIES), '-->');
1919 return node.nodeName === '#document-fragment';
2019 // - can't put into "function arg" comments
2027 // - can't reliably auto-annotate constructor; we'll match the
2098 var stack = currentlyResolving.join(' -> ');
2112 if (!providers[name] && name.indexOf('.') !== -1) {
2128 if (currentlyResolving.indexOf(name) !== -1) {
2216 if (forceNewInstances.indexOf(name) !== -1) {
2219 if (cacheIdx === -1) {
2236 /* jshint -W083 */
2238 if (provider[1].$scope.indexOf(scope) !== -1) {
2411 return elements.join(',').replace(/,?([A-z]),?/g, '$1');
2485 function add$1(elements, e, unique) {
2486 var canAdd = !unique || elements.indexOf(e) === -1;
2529 * @param {number} maxDepth the depth to search through or -1 for infinite
2538 add$1(result, element, unique);
2543 if (maxDepth === -1 || depth < maxDepth) {
2546 if (children && add$1(processedChildren, children, unique)) {
2565 return selfAndChildren(elements, !allowDuplicates, -1);
2702 height: maxY - minY,
2703 width: maxX - minX
2794 this.CONNECTION_STYLE = styles.style([ 'no-fill' ], { strokeWidth: 5, stroke: 'fuchsia' });
2796 …this.FRAME_STYLE = styles.style([ 'no-fill' ], { stroke: 'fuchsia', strokeDasharray: 4, strokeWidt…
2846 ['l', -width, 0],
2880 'no-fill': {
2883 'no-border': {
2886 'no-events': {
2957 return -1;
2962 if (idx !== -1) {
2970 * Fail save add an element to the given connection, ensuring
2977 function add(collection, element, idx) { function
2984 idx = -1;
2989 if (currentIdx !== -1) {
2997 if (idx !== -1) {
3009 if (idx !== -1) {
3027 * @return {number} the index or -1 if collection or element do
3033 return -1;
3049 return -1;
3053 Math.pow(a.x - b.x, 2) +
3054 Math.pow(a.y - b.y, 2)
3079 var val = (q.x - p.x) * (r.y - p.y) - (q.y - p.y) * (r.x - p.x),
3129 return Math.abs(firstPoint.y - point.y) <= ALIGNED_THRESHOLD;
3145 return Math.abs(firstPoint.x - point.x) <= ALIGNED_THRESHOLD;
3163 return p.x > rect.x - tolerance &&
3164 p.y > rect.y - tolerance &&
3179 x: Math.round(p.x + ((q.x - p.x) / 2.0)),
3180 y: Math.round(p.y + ((q.y - p.y) / 2.0))
3185 * This file contains source code adapted from Snap.svg (licensed Apache-2.0).
3187 * @see https://github.com/adobe-webplatform/Snap.svg/blob/master/src/path.js
3190 /* eslint no-fallthrough: "off" */
3192 var p2s = /,?([a-z]),?/gi,
3200 pathCommand = /([a-z])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?[\s]*,?[\s]*)+)/ig,
3201 pathValues = /(-?\d*\.?\d*(?:e[-+]?\d+)?)[\s]*,?[\s]*/ig;
3319 p[key].sleep--;
3358 var t1 = 1 - t,
3379 bbox.x1 - bbox.x0,
3380 bbox.y1 - bbox.y0
3409 var t1 = -3 * p1 + 9 * p2 - 9 * p3 + 3 * p4,
3410 t2 = t * t1 + 6 * p1 - 12 * p2 + 6 * p3;
3411 return t * t2 - 3 * p1 + 3 * p2;
3424 Tvalues = [-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],
3452 var nx = (x1 * y2 - y1 * x2) * (x3 - x4) - (x1 - x2) * (x3 * y4 - y3 * x4),
3453 ny = (x1 * y2 - y1 * x2) * (y3 - y4) - (y1 - y2) * (x3 * y4 - y3 * x4),
3454 denominator = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4);
3521 ci = abs$7(di1.x - di.x) < .01 ? 'y' : 'x',
3522 cj = abs$7(dj1.x - dj.x) < .01 ? 'y' : 'x',
3535 var t1 = di.t + abs$7((is[ci] - di[ci]) / (di1[ci] - di[ci])) * (di1.t - di.t),
3536 t2 = dj.t + abs$7((is[cj] - dj[cj]) / (dj1[cj] - dj[cj])) * (dj1.t - dj.t);
3739 mx = r[r.length - 2];
3740 my = r[r.length - 1];
3742 x = r[r.length - 2];
3743 y = r[r.length - 1];
3792 var X = x * math.cos(rad) - y * math.sin(rad),
3799 xy = rotate(x1, y1, -rad);
3802 xy = rotate(x2, y2, -rad);
3806 var x = (x1 - x2) / 2,
3807 y = (y1 - y2) / 2;
3819 k = (large_arc_flag == sweep_flag ? -1 : 1) *
3820 … math.sqrt(abs$7((rx2 * ry2 - rx2 * y * y - ry2 * x * x) / (rx2 * y * y + ry2 * x * x))),
3822 cy = k * -ry * x / rx + (y1 + y2) / 2,
3823 f1 = math.asin(((y1 - cy) / ry).toFixed(9)),
3824 f2 = math.asin(((y2 - cy) / ry).toFixed(9));
3826 f1 = x1 < cx ? PI - f1 : f1;
3827 f2 = x2 < cx ? PI - f2 : f2;
3832 f1 = f1 - PI * 2;
3835 f2 = f2 - PI * 2;
3844 var df = f2 - f1;
3851 f2 = f1 + _120 * (sweep_flag && f2 > f1 ? 1 : -1);
3857 df = f2 - f1;
3867 m2 = [x1 + hx * s1, y1 - hy * c1],
3868 m3 = [x2 + hx * s2, y2 - hy * c2],
3871 m2[0] = 2 * m1[0] - m2[0];
3872 m2[1] = 2 * m1[1] - m2[1];
3881 newres[i] = i % 2 ? rotate(res[i - 1], res[i], rad).y : rotate(res[i], res[i + 1], rad).x;
3889 // Source: http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html
3900 b = 6 * x0 - 12 * x1 + 6 * x2;
3901 a = -3 * x0 + 9 * x1 - 9 * x2 + 3 * x3;
3902 c = 3 * x1 - 3 * x0;
3904 b = 6 * y0 - 12 * y1 + 6 * y2;
3905 a = -3 * y0 + 9 * y1 - 9 * y2 + 3 * y3;
3906 c = 3 * y1 - 3 * y0;
3909 if (abs$7(a) < 1e-12) {
3911 if (abs$7(b) < 1e-12) {
3915 t = -c / b;
3924 b2ac = b * b - 4 * c * a;
3931 t1 = (-b + sqrtb2ac) / (2 * a);
3937 t2 = (-b - sqrtb2ac) / (2 * a);
3948 while (j--) {
3950 mt = 1 - t;
4001 nx = d.x * 2 - d.bx;
4004 ny = d.y * 2 - d.by;
4020 d.qx = d.x * 2 - d.qx;
4023 d.qy = d.y * 2 - d.qy;
4083 i && (pathCommand = pathCommands[i - 1]); // Get previous path command pathCommand
4096 attrs.x = seg[seglen - 2];
4097 attrs.y = seg[seglen - 1];
4098 attrs.bx = toFloat(seg[seglen - 4]) || attrs.x;
4099 attrs.by = toFloat(seg[seglen - 3]) || attrs.y;
4157 width: trbl.right - trbl.left,
4158 height: trbl.bottom - trbl.top
4191 * @return {string} the orientation; one of top, top-left, left, ..., bottom, right or intersect.
4208 right = rectOrientation.left - padding.x >= referenceOrientation.right,
4209 bottom = rectOrientation.top - padding.y >= referenceOrientation.bottom,
4216 return vertical + '-' + horizontal;
4239 // only one -> choose
4240 // two close together -> choose first
4241 // two or more distinct -> pull out appropriate one
4242 // none -> ok (fallback to point itself)
4254 distance = 100 - distance;
4264 return roundPoint(intersections[cropStart ? 0 : intersections.length - 1]);
4288 previousPoint = waypoints[idx - 1];
4295 // or on line with {previousPoint} -> {point} -> {nextPoint}
4338 parent.setAttribute('class', 'djs-container');
4354 classes(group).add(cls);
4356 var index = childIndex !== undefined ? childIndex : parent.childNodes.length - 1;
4359 // cf. https://developer.mozilla.org/en-US/docs/Web/API/Node/insertBefore
4366 var HIDDEN_MARKER = 'djs-element-hidden';
4408 * (It is not possible to get the size of a svg element cross browser @ 2014-04-01)
4410 * <div class="djs-container" style="width: {desired-width}, height: {desired-height}">
4534 * Non-existing layers retrieved through this method
4589 group: createGroup(this._viewport, 'layer-' + name, childIndex),
4639 classes(svgLayer).add(HIDDEN_MARKER);
4670 classes(this._activePlane.layer).add(HIDDEN_MARKER);
4744 Canvas.prototype._updateMarker = function(element, marker, add) { argument
4762 if (add) {
4763 classes(gfx).add(marker);
4778 * @property {boolean} add true if the marker was added, false if it got removed
4780 …ire('element.marker.update', { element: element, gfx: container.gfx, marker: marker, add: !!add }); property
4788 * integrate extension into the marker life-cycle, too.
4791 * canvas.addMarker('foo', 'some-marker');
4795 * fooGfx; // <g class="... some-marker"> ... </g>
4809 * integrate extension into the marker life-cycle, too.
4838 * integrate extension into the marker life-cycle, too.
4924 // resemble element add event sequence
4925 eventBus.fire('root.add', { element: element });
4927 elementRegistry.add(element, gfx);
4942 // add functionality //////////////////////
4966 add(parent.children, element, parentIndex);
4973 * This wires the parent <-> child relationship between the element and
4976 * During add it emits the events
4978 * * <{type}.add> (element, parent)
4999 eventBus.fire(type + '.add', { element: element, parent: parent });
5006 this._elementRegistry.add(element, gfx);
5019 * @param {Object|djs.model.Shape} shape to add to the diagram
5032 * @param {Object|djs.model.Connection} connection to add to the diagram
5064 // unset parent <-> child relationship
5172 // triggers a viewbox re-computation
5196 * // sets the visible area of the diagram to (100|100) -> (600|100)
5255 x = round$b(-matrix.e || 0, 1000);
5256 y = round$b(-matrix.f || 0, 1000);
5281 .translate(-box.x, -box.y);
5357 viewboxBounds.width -= (padding.right + padding.left) / zoom;
5358 viewboxBounds.height -= (padding.bottom + padding.top) / zoom;
5366 // top-left when element can't fit
5367 dx = elementBounds.x - viewboxBounds.x;
5368 dy = elementBounds.y - viewboxBounds.y;
5372 var dRight = Math.max(0, elementTrbl.right - viewboxTrbl.right),
5373 dLeft = Math.min(0, elementTrbl.left - viewboxTrbl.left),
5374 dBottom = Math.max(0, elementTrbl.bottom - viewboxTrbl.bottom),
5375 dTop = Math.min(0, elementTrbl.top - viewboxTrbl.top);
5382 this.scroll({ dx: -dx * zoom, dy: -dy * zoom });
5393 …* or `fit-viewport` to adjust the size to fit the current viewpo…
5404 if (newScale === 'fit-viewport') {
5464 x: inner.x + (center ? inner.width / 2 - outer.width / newScale / 2 : 0),
5465 y: inner.y + (center ? inner.height / 2 - outer.height / newScale / 2 : 0),
5505 .translate(-originalPoint.x, -originalPoint.y);
5559 var x = bbox.x * vbox.scale - vbox.x * vbox.scale;
5560 var y = bbox.y * vbox.scale - vbox.y * vbox.scale;
5585 var ELEMENT_ID = 'data-element-id';
5608 ElementRegistry.prototype.add = function(element, gfx, secondaryGfx) {
5673 this.add(element, gfx, secondaryGfx);
5873 if (idx !== -1) {
5893 return this.indexOf(element) !== -1;
5900 * @method RefsCollection#add
5902 * @param {Object} element the element to add
5903 * @param {Number} optional index to add element to
5906 Object.defineProperty(collection, 'add', {
5913 if (currentIdx !== -1) {
5918 // add to end of array, as no idx is specified
5923 if (currentIdx !== -1) {
5929 // add element at idx
5932 if (currentIdx === -1) {
6028 * get activated and ensure that add and remove operations are applied
6034 …* {@link RefsCollection#add}, {@link RefsCollection#remove} and {@link RefsCollection#contains} …
6040 * @classdesc A bi-directional reference between two attributes.
6050 * var wheels = [{ pos: 'front-left' }, { pos: 'front-right' }];
6055 * car.wheels.add(wheels[0]);
6056 * car.wheels.add(wheels[1]);
6058 * car.wheels // [{ pos: 'front-left' }, { pos: 'front-right' }]
6081 * Binds one side of a bi-directional reference to a
6140 this.ensureRefsCollection(target, property).add(value);
6207 labels.add(newLabel, 0);
6376 * @param {string} type lower-cased model name
6390 * A factory for diagram-js shapes
6415 * a number of pre-set attributes.
6818 * Add new listener with a certain priority to the list
6866 // add new listener to back
7045 classes(childrenGfx).add('djs-children');
7056 * cleared visual (the <g class="djs-visual" /> element).
7071 * <g class="djs-group">
7073 * <!-- the gfx -->
7074 * <g class="djs-element djs-(shape|connection|frame)">
7075 * <g class="djs-visual">
7076 * <!-- the renderer draws in here -->
7079 * <!-- extensions (overlays, click box, ...) goes here
7082 * <!-- the gfx child nodes -->
7083 * <g class="djs-children"></g>
7097 classes(outerGfx).add('djs-group');
7107 classes(gfx).add('djs-element');
7108 classes(gfx).add('djs-' + type);
7111 classes(gfx).add('djs-frame');
7118 classes(visual).add('djs-visual');
7232 // https://github.com/bpmn-io/bpmn-js/issues/746
7332 * The main diagram-js entry point that bootstraps the diagram with the given
7343 * <caption>Creating a plug-in that logs whenever a shape is added to the canvas.</caption>
7345 * // plug-in implemenentation
7359 * // instantiate the diagram with the new plug-in
7361 * import MyLoggingModule from 'path-to-my-logging-plugin';
7370 * // add shape to drawing canvas
7413 * An event indicating that all plug-ins are loaded.
7415 * Use this event to fire other events to interested plug-ins
7424 * eventBus.fire('my-custom-event', { foo: 'BAR' });
7518 * Built-in moddle types
7553 * Return whether the given type is built-in
7628 * Add property at given index.
7684 if (idx === -1) {
7694 // * add at specific index unless we "replace"
7805 // add replace/redefine support
7996 this.definePackage(descriptor, descriptor.allTypes[descriptor.allTypes.length - 1].$pkg);
8223 * Creates an any-element type to be used within model instances.
8225 * This can be used to create custom elements that lie outside the meta-model.
8226 * The created element contains all the meta-data required to serialize it
8227 * as part of meta-model elements.
8346 var ENTITY_PATTERN = /&#(\d+);|&#x([0-9a-f]+);|&(\w+);/ig;
8387 * sub-set of reserved names (&amp;) as well as
8395 if (s.length > 3 && s.indexOf('&') !== -1) {
8402 var XSI_URI = 'http://www.w3.org/2001/XMLSchema-instance';
8406 var NON_WHITESPACE_OUTSIDE_ROOT_NODE = 'non-whitespace outside of root node';
8738 w === 45 || // '-'
8773 if (j === -1) {
8776 if (j !== -1) {
8785 if (j === -1) {
8788 if (j !== -1) {
8809 if (j === -1) {
8846 // check attribute re-declaration
8925 if (w === -1) {
8946 if (w !== -1) {
8974 if (w !== -1) {
8992 if (w !== -1) {
9053 if (i == -1) {
9065 column = i - startOfLine;
9066 data = (j == -1 ? xml.substring(i) : xml.substring(i, j + 1));
9095 while (j !== -1) {
9104 if (i === -1) {
9153 if (j === -1) {
9169 if (q === 45 && xml.charCodeAt(i + 3) === 45) { // 45 == "-"
9170 j = xml.indexOf('-->', i);
9171 if (j === -1) {
9191 if (j === -1) {
9212 j = -1;
9222 x = q !== -1 ? q : x;
9225 x = q !== -1 ? q : x;
9261 // verify open <-> close tag match
9281 if (xml.charCodeAt(j - 1) === 47) { // .../>
9282 x = elementName = xml.substring(i + 1, j - 1);
9328 // unless we're self-closing
9338 if ((maybeNS = x.indexOf('xmlns', q) !== -1)) {
9352 if (w !== -1) {
9428 'xsi': 'http://www.w3.org/2001/XMLSchema-instance',
9523 * Add an unresolved reference.
9532 * Add a processed element.
9554 // for QName validation as per http://www.w3.org/TR/REC-xml/#NT-NameChar
9555 if (!/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i.test(id)) {
9569 * Add an import warning.
9752 // IDREFS: parse references as whitespace-separated list
9771 // check whether attribute is defined in a well-known namespace
9926 // establish child -> parent relationship
10000 // establish child -> parent relationship
10014 * A reader for a meta-model
10039 * @property {Object} elementsById - a mapping containing each ID -> ModdleElement
10113 if (data.charAt(0) === '<' && data.indexOf(' ') !== -1) {
10169 // we replace an existing place holder (idx != -1) or
10171 if (idx === -1) {
10181 // add or update reference in collection
10198 var UTF_8_PATTERN = /^utf-8$/i;
10216 'falling back to UTF-8'
10259 'http://www.w3.org/XML/1998/namespace': 'xml' // add default xml ns
10346 return this[this.length - 1];
10353 var XML_PREAMBLE = '<?xml version="1.0" encoding="UTF-8"?>\n';
10376 this.add = function(ns, isWellknown) { method in Namespaces
10598 if (prop.type === 'String' && value.search(ESCAPE_CHARS) !== -1) {
10921 namespaces.add(ns, wellknown);
10998 // IDREFS is a whitespace-separated list of references.
11101 // add xsi:type attribute to represent the elements
11165 * A writer for meta-model backed document trees
11216 * @property {Object} elementsById - a mapping containing each ID -> ModdleElement
14715 subsettedProperty: "DiagramElement-ownedElement",
14731 subsettedProperty: "DiagramElement-ownedElement",
14748 subsettedProperty: "DiagramElement-ownedElement",
14859 var uri$5 = "http://www.omg.org/spec/BPMN/non-normative/color/1.0";
14882 name: "background-color",
14887 name: "border-color",
14900 name: "border-color",
14949 * Returns true if an element has the given meta-model type
15094 if (diagram && diagrams.indexOf(diagram) === -1) {
15102 // no diagram -> nothing to import
15193 // we do this to pass the free-floating lane test cases in the MIWG test suite
15372 // wire the virtual flowNodeRefs <-> relationship
15441 return importer.add(element);
15445 return importer.add(element, parentShape);
15484 // TODO(nikku): remove with future bpmn-js version
15489 * 1) If a callback is passed -> Warn users about callback deprecation.
15503 if (argLen >= 1 && isFunction(arguments[argLen - 1])) {
15505 var callback = arguments[argLen - 1];
15509 'Please switch to promises: https://bpmn.io/l/moving-to-promises.html'
15512 var argsWithoutCallback = Array.prototype.slice.call(arguments, 0, -1);
15544-align:middle"><path fill="currentColor" d="M1.88.92v.14c0 .41-.13.68-.4.8.33.14.46.44.46.86v.33c0…
15557 'z-index: 1001',
15575 'transform: translate(-50%)',
15579 'box-shadow: 0 1px 4px rgba(0,0,0,0.3)',
15580 'font-family: Helvetica, Arial, sans-serif',
15581 'font-size: 14px',
15583 'line-height: 1.3'
15587 '<div class="bjs-powered-by-lightbox" style="' + LIGHTBOX_STYLES + '">' +
15590 …io" target="_blank" rel="noopener" style="margin: 15px 20px 15px 10px; align-self: center;' + LINK…
15594 'Web-based tooling for BPMN, DMN and CMMN diagrams ' +
15617 * The code in the <project-logo></project-logo> area
15645 /* <project-logo> */
15649 /* </project-logo> */
15678 * ## Life-Cycle Events
15680 * During import the viewer will fire life-cycle events:
15688 * You can use these events to hook into the life-cycle.
15703 // TODO(nikku): remove with future bpmn-js version
15726 // hook in pre-parse listeners +
15796 * ## Life-Cycle Events
15798 * During import the viewer will fire life-cycle events:
15803 * You can use these events to hook into the life-cycle.
15852 * ## Life-Cycle Events
15854 * During switch the viewer will fire life-cycle events:
15859 * You can use these events to hook into the life-cycle.
15923 * ## Life-Cycle Events
15925 * During XML saving the viewer will fire life-cycle events:
15931 * You can use these events to hook into the life-cycle.
16000 * ## Life-Cycle Events
16002 * During SVG saving the viewer will fire life-cycle events:
16007 * You can use these events to hook into the life-cycle.
16035 '<?xml version="1.0" encoding="utf-8"?>\n' +
16036 '<!-- created with bpmn-js / http://bpmn.io -->\n' +
16037 …'<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"…
16160 * De-register an event listener
16253 var container = domify('<div class="bjs-container"></div>');
16343 'class="bjs-powered-by" ' +
16345 … 'style="position: absolute; bottom: 15px; right: 15px; z-index: 100; ' + LINK_STYLES + '">' +
16360 /* </project-logo> */
16588 /* jshint -W116 */
16622 return di.get('color:background-color') || di.get('bioc:fill') || defaultColor || 'white';
16628 return di.get('color:border-color') || di.get('bioc:stroke') || defaultColor || 'black';
16649 ['m', 0, -radius],
16651 ['a', radius, radius, 0, 1, 1, 0, -2 * radius],
16667 ['l', width - borderRadius * 2, 0],
16669 ['l', 0, height - borderRadius * 2],
16670 ['a', borderRadius, borderRadius, 0, 0, 1, -borderRadius, borderRadius],
16671 ['l', borderRadius * 2 - width, 0],
16672 ['a', borderRadius, borderRadius, 0, 0, 1, -borderRadius, -borderRadius],
16673 ['l', 0, borderRadius * 2 - height],
16674 ['a', borderRadius, borderRadius, 0, 0, 1, borderRadius, -borderRadius],
16693 ['l', -halfWidth, halfHeight],
16694 ['l', -halfWidth, -halfHeight],
16711 ['l', -width, 0],
16794 return str.replace(/[^0-9a-zA-z]+/g, '_');
16798 var id = type + '-' + colorEscape(fill) + '-' + colorEscape(stroke) + '-' + rendererId;
16809 if (type === 'sequenceflow-end') {
16824 if (type === 'messageflow-start') {
16838 if (type === 'messageflow-end') {
16840 attr(messageflowEnd, { d: 'm 1 5 l 0 -3 l 7 3 l -7 3 z' });
16853 if (type === 'association-start') {
16869 if (type === 'association-end') {
16885 if (type === 'conditional-flow-marker') {
16895 ref: { x: -1, y: 10 },
16900 if (type === 'conditional-default-flow-marker') {
16941 r: Math.round((width + height) / 4 - offset)
16969 width: width - offset * 2,
16970 height: height - offset * 2,
17010 attrs = computeStyle(attrs, [ 'no-fill' ], {
17025 attrs = computeStyle(attrs, [ 'no-fill' ], {
17040 return drawPath(parentGfx, path, assign({ 'data-marker': type }, attrs));
17120 classes(text).add('djs-label');
17168 align: 'center-middle',
17174 var top = -1 * element.height;
17176 transform(textBox, 0, -top, 270);
17379 my: -0.055
17532 renderEmbeddedLabel(parentGfx, element, 'center-middle');
17769 renderEmbeddedLabel(parentGfx, element, expanded ? 'center-top' : 'center-middle');
17785 var innerAttrs = styles.style([ 'no-fill', 'no-events' ], {
17789 …/* inner path */ drawRect(parentGfx, element.width, element.height, TASK_BORDER_RADIUS - 2, INNER_…
17824 box: element, align: 'center-middle',
18024 markerEnd: marker('sequenceflow-end', fill, stroke),
18040 markerStart: marker('conditional-flow-marker', fill, stroke)
18048 markerStart: marker('conditional-default-flow-marker', fill, stroke)
18071 attrs.markerEnd = marker('association-end', fill, stroke);
18075 attrs.markerStart = marker('association-start', fill, stroke);
18085 markerEnd: marker('association-end', fill, stroke)
18093 markerEnd: marker('association-end', fill, stroke)
18107 markerEnd: marker('messageflow-end', fill, stroke),
18108 markerStart: marker('messageflow-start', fill, stroke),
18142 align: 'center-top',
18152 var translateX = midPoint.x - labelBounds.width / 2,
18254 // apply no-fill
18308 align: 'left-top',
18325 my: (element.height - 15) / element.height
18329 drawMarker('participant-multiplicity', parentGfx, markerPath, {
18344 translate$2(markerRect, element.width / 2 - 7.5, element.height - 20);
18352 mx: (element.width / 2 - 7.5) / element.width,
18353 my: (element.height - 20) / element.height
18357 drawMarker('sub-process', parentGfx, markerPath, {
18370 my: (element.height - 20) / element.height
18387 my: (element.height - 19) / element.height
18404 my: (element.height - 13) / element.height
18422 my: (element.height - 7) / element.height
18442 my: (element.height - 15) / element.height
18457 var subprocess = taskMarkers && taskMarkers.indexOf('SubProcessMarker') !== -1;
18462 seq: -21,
18463 parallel: -22,
18464 compensation: -42,
18465 loop: -18,
18470 seq: -3,
18471 parallel: -6,
18472 compensation: -27,
18511 var yPosition = (element.height - 18) / element.height;
18556 /* jshint -W040 */
18564 /* jshint -W040 */
18595 var parts = align.split('-');
18627 // add dummy text, when line is empty to
18709 var parts = line.split(/(\s|-|\u00AD)/g),
18724 if (part === '-' || part === SOFT_BREAK) {
18733 var last = shortenedParts[shortenedParts.length - 1];
18737 shortenedParts[shortenedParts.length - 1] = '-';
18753 shortenedLine = line.slice(0, Math.max(Math.round(length - 1), 1));
18761 var helperSvg = document.getElementById('helper-svg');
18767 id: 'helper-svg',
18795 align: 'center-top'
18831 * Any of { 'center-middle', 'center-top' },
18832 * defaults to 'center-top'.
18853 var maxWidth = box.width - padding.left - padding.right;
18884 y += (box.height - totalHeight) / 2;
18888 y -= (lineHeight || layouted[0].height) / 4;
18910 - padding.right - line.width);
18917 - line.width) / 2 + padding.left), 0);
18957 fontFamily: 'Arial, sans-serif',
18963 var fontSize = parseInt(defaultStyle.fontSize, 10) - 1;
18996 x: Math.round(bounds.x + bounds.width / 2 - layoutedDimensions.width / 2),
19017 align: 'left-top',
19074 * d: 'm {mx},{my} {e.x0},0 0,{e.x1} {e.x1},0 0,{e.y0} -{e.x1},0 0,{e.y1} ' +
19075 '-{e.x0},0 0,-{e.y1} -{e.x1},0 0,-{e.y0} {e.x1},0 z',
19100 d: 'm {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}',
19107 d: 'M {mx},{my} l {e.x0},{e.y0} l -{e.x1},0 Z',
19114 d: 'M {mx},{my} l {e.x0},{e.y0} l -{e.x0},-{e.y1} l -{e.x0},{e.y1} Z',
19121 d: 'M {e.x0},{e.y0} l {e.x1},0 l 0,{e.y2} l -{e.x1},0 Z ' +
19134 … d: 'm {mx},{my} 0,{e.y0} -{e.x1},0 0,{e.y1} {e.x1},0 0,{e.y0} {e.x0},-{e.y2} -{e.x0},-{e.y2} z',
19141 …d: 'm {mx},{my} {e.x0},-{e.y0} {e.x1},-{e.y1} {e.x2},{e.y2} {e.x3},-{e.y3} -{e.x4},{e.y4} -{e.x5},
19148 d: 'm {mx},{my} -{e.x1},0 0,{e.x0} {e.x1},0 0,{e.y1} {e.x0},0 ' +
19149 '0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z',
19156 …d: 'm {mx},{my} {e.x0},-{e.y0} 0,{e.y1} z m {e.x1},-{e.y2} {e.x2},-{e.y3} 0,{e.y1} -{e.x2},-{e.y3}…
19163 d: 'M {mx},{my} l {e.x0},-{e.y0} m -{e.x0},{e.y0} l {e.x1},{e.y1} ',
19171 'm {e.x0},{e.y0} l -{e.x1},{e.y1} ',
19178 d:'m {mx},{my} {e.x1},-{e.y0} {e.x1},{e.y0} -{e.x0},{e.y1} -{e.x2},0 z',
19185 d:'m {mx},{my} {e.x0},0 0,{e.y1} {e.x1},0 0,{e.y0} -{e.x1},0 0,{e.y1} ' +
19186 '-{e.x0},0 0,-{e.y1} -{e.x1},0 0,-{e.y0} {e.x1},0 z',
19198 heightElements: [8.5, 6.5312, -6.5312, -8.5],
19199 widthElements: [6.5, -6.5, 3, -3, 5, -5]
19202 d:'m {mx},{my} 0,{e.y1} -{e.x1},0 0,{e.y0} {e.x1},0 0,{e.y1} {e.x0},0 ' +
19203 '0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z',
19213 heightElements: [-6, 6, 12, -12],
19214 widthElements: [9, -3, -12]
19217 d:'m {mx},{my} 0,{e.y0} -{e.x0},-{e.y1} -{e.x1},{e.y2} {e.x0},{e.y1} -{e.x2},0 0,{e.y3} ' +
19218 …'{e.x2},0 -{e.x0},{e.y1} l {e.x1},{e.y2} {e.x0},-{e.y1} 0,{e.y0} {e.x3},0 0,-{e.y0} {e.x0},{e.y1}…
19219 … '{e.x1},-{e.y2} -{e.x0},-{e.y1} {e.x2},0 0,-{e.y3} -{e.x2},0 {e.x0},-{e.y1} -{e.x1},-{e.y2} ' +
19220 '-{e.x0},{e.y1} 0,-{e.y0} -{e.x3},0 z',
19227 d:'m 0,0 {e.x1},0 {e.x0},{e.y0} 0,{e.y1} -{e.x2},0 0,-{e.y2} {e.x1},0 0,{e.y0} {e.x0},0',
19234 d: 'm{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10',
19241 d:'m 5,9 9,0 0,-3 5,5 -5,5 0,-3 -9,0 z',
19251 'l 0,-{e.y2} ' +
19252 'c -{e.x0},-{e.y1} -{e.x1},-{e.y1} -{e.x2},0' +
19254 'm -{e.x2},{e.y0}' +
19256 'm -{e.x2},{e.y0}' +
19264 d: 'm {mx}, {my} m 10,0 l -10,0 l 0,{e.y0} l 10,0',
19271 d: 'm{mx},{my} m 7,2 l 0,10 m -5,-5 l 10,0',
19278 d: 'm{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10',
19285 d: 'm{mx},{my} m 0,3 l 10,0 m -10,3 l 10,0 m -10,3 l 10,0',
19292 d: 'm {mx},{my} 7,-5 0,10 z m 7.1,-0.3 6.9,-4.7 0,10 -6.9,-4.7 z',
19299 …d: 'm {mx},{my} c 3.526979,0 6.386161,-2.829858 6.386161,-6.320661 0,-3.490806 -2.859182,-6.320661…
19300 '-6.386161,-6.320661 -3.526978,0 -6.38616,2.829855 -6.38616,6.320661 0,1.745402 ' +
19302 'l -0.718163,-3.909793 m 0.718163,3.909793 -3.885211,0.802902',
19309 …d: 'm {mx},{my} m 0.84461,2.64411 c 1.05533,-1.23780996 2.64337,-2.07882 4.29653,-1.97997996 2.051…
19310 …579,1.15803 5.76082,1.79107 1.06385,0.34139996 2.24454,0.1438 3.18759,-0.43767 0.61743,-0.33642 ' +
19311 …'1.2775,-0.64078 1.7542,-1.17511 0,0.56023 0,1.12046 0,1.6807 -0.98706,0.96237996 -2.29792,1.62393…
19312 … '-3.6918,1.66181996 -1.24459,0.0927 -2.46671,-0.2491 -3.59505,-0.74812 -1.35789,-0.55965 ' +
19313 …'-2.75133,-1.33436996 -4.27027,-1.18121996 -1.37741,0.14601 -2.41842,1.13685996 -3.44288,1.9678299…
19320 d: 'm {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}',
19327 d: 'm {mx},{my} c 9.966553,-6.27276 -8.000926,-7.91932 2.968968,-14.938 l -8.802728,0 ' +
19328 'c -10.969894,7.01868 6.997585,8.66524 -2.968967,14.938 z ' +
19329 'm -7,-12 l 5,0 ' +
19330 'm -4.5,3 l 4.5,0 ' +
19331 'm -3,3 l 5,0' +
19332 'm -4,3 l 5,0',
19339 d: 'm {mx},{my} c 0.909,-0.845 1.594,-2.049 1.594,-3.385 0,-2.554 -1.805,-4.62199999 ' +
19340 '-4.357,-4.62199999 -2.55199998,0 -4.28799998,2.06799999 -4.28799998,4.62199999 0,1.348 ' +
19341 '0.974,2.562 1.89599998,3.405 -0.52899998,0.187 -5.669,2.097 -5.794,4.7560005 v 6.718 ' +
19342 'h 17 v -6.718 c 0,-2.2980005 -5.5279996,-4.5950005 -6.0509996,-4.7760005 z' +
19343 'm -8,6 l 0,5.5 m 11,0 l 0,-5'
19346 d: 'm {mx},{my} m 2.162,1.009 c 0,2.4470005 -2.158,4.4310005 -4.821,4.4310005 ' +
19347 '-2.66499998,0 -4.822,-1.981 -4.822,-4.4310005 '
19350 … d: 'm {mx},{my} m -6.9,-3.80 c 0,0 2.25099998,-2.358 4.27399998,-1.177 2.024,1.181 4.221,1.537 ' +
19351 '4.124,0.965 -0.098,-0.57 -0.117,-3.79099999 -4.191,-4.13599999 -3.57499998,0.001 ' +
19352 '-4.20799998,3.36699999 -4.20699998,4.34799999 z'
19355 …d: 'm {mx},{my} c 0.234,-0.01 5.604,0.008 8.029,0.004 0.808,0 1.271,-0.172 1.417,-0.752 0.227,-0.8…
19356 …'-0.334,-1.314 -1.338,-1.316 -2.467,-0.01 -7.886,-0.004 -8.108,-0.004 -0.014,-0.079 0.016,-0.533 0…
19357 …'0.195,-0.042 8.507,0.006 9.616,0.002 0.877,-0.007 1.35,-0.438 1.353,-1.208 0.003,-0.768 -0.479,-1…
19358 …'-1.35,-1.091 -2.968,-0.002 -9.619,-0.013 -9.619,-0.013 v -0.591 c 0,0 5.052,-0.016 7.225,-0.016 '…
19359 …'0.888,-0.002 1.354,-0.416 1.351,-1.193 -0.006,-0.761 -0.492,-1.196 -1.361,-1.196 -3.473,-0.005 ' +
19360 … '-10.86,-0.003 -11.0829995,-0.003 -0.022,-0.047 -0.045,-0.094 -0.069,-0.139 0.3939995,-0.319 ' +
19361 …'2.0409995,-1.626 2.4149995,-2.017 0.469,-0.4870005 0.519,-1.1650005 0.162,-1.6040005 -0.414,-0.51…
19362 …'-0.973,-0.5 -1.48,-0.236 -1.4609995,0.764 -6.5999995,3.6430005 -7.7329995,4.2710005 -0.9,0.499 ' +
19363 …'-1.516,1.253 -1.882,2.19 -0.37000002,0.95 -0.17,2.01 -0.166,2.979 0.004,0.718 -0.27300002,1.345 '…
19364 …'-0.055,2.063 0.629,2.087 2.425,3.312 4.859,3.318 4.6179995,0.014 9.2379995,-0.139 13.8569995,-0.1…
19365 … '0.755,-0.004 1.171,-0.301 1.182,-1.033 0.012,-0.754 -0.423,-0.969 -1.183,-0.973 -1.778,-0.01 ' +
19366 '-5.824,-0.004 -6.04,-0.004 10e-4,-0.084 0.003,-0.586 10e-4,-0.67 z'
19369 d: 'm {mx},{my} l 0,8.4 l 12.6,0 l 0,-8.4 z l 6.3,3.6 l 6.3,-3.6'
19372 d: 'm {mx},{my} v -1.71335 c 0.352326,-0.0705 0.703932,-0.17838 1.047628,-0.32133 ' +
19373 … '0.344416,-0.14465 0.665822,-0.32133 0.966377,-0.52145 l 1.19431,1.18005 1.567487,-1.57688 ' +
19374 … '-1.195028,-1.18014 c 0.403376,-0.61394 0.683079,-1.29908 0.825447,-2.01824 l 1.622133,-0.01 ' +
19375 'v -2.2196 l -1.636514,0.01 c -0.07333,-0.35153 -0.178319,-0.70024 -0.323564,-1.04372 ' +
19376 …'-0.145244,-0.34406 -0.321407,-0.6644 -0.522735,-0.96217 l 1.131035,-1.13631 -1.583305,-1.56293 ' +
19377 …'-1.129598,1.13589 c -0.614052,-0.40108 -1.302883,-0.68093 -2.022633,-0.82247 l 0.0093,-1.61852 ' +
19378 …'h -2.241173 l 0.0042,1.63124 c -0.353763,0.0736 -0.705369,0.17977 -1.049785,0.32371 -0.344415,0.1…
19379 …'-0.665102,0.32092 -0.9635006,0.52046 l -1.1698628,-1.15823 -1.5667691,1.5792 1.1684265,1.15669 ' +
19380 'c -0.4026573,0.61283 -0.68308,1.29797 -0.8247287,2.01713 l -1.6588041,0.003 v 2.22174 ' +
19381 … 'l 1.6724648,-0.006 c 0.073327,0.35077 0.1797598,0.70243 0.3242851,1.04472 0.1452428,0.34448 ' +
19382 … '0.3214064,0.6644 0.5227339,0.96066 l -1.1993431,1.19723 1.5840256,1.56011 1.1964668,-1.19348 ' +
19383 'c 0.6140517,0.40346 1.3028827,0.68232 2.0233517,0.82331 l 7.19e-4,1.69892 h 2.226848 z ' +
19384 … 'm 0.221462,-3.9957 c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 ' +
19385 '0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 ' +
19386 '0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z'
19389 … d: 'm {mx},{my} c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 ' +
19390 '0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 ' +
19391 '0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z'
19394 d: 'm {mx},{my} 0,4 20,0 0,-4 z'
19397 d: 'm {mx},{my} 0,12 20,0 0,-12 z' +
19399 'm -13,-4 l 0,8'
19402 d: 'm {mx},{my} m -10.5 ,-7 l 0,14 l 21,0 l 0,-14 z l 10.5,6 l 10.5,-6'
19418 * the option 'non-scaling-stroke' to prevent this.
19507 // copied and adjusted from https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js
19541 * A simple translation stub to be used for multi-language support
19616 var mid = waypoints.length / 2 - 1;
19625 var angle = Math.atan((second.y - first.y) / (second.x - first.x));
19631 y -= FLOW_LABEL_INDENT;
19648 var mid = waypoints.length / 2 - 1;
19654 x: first.x + (second.x - first.x) / 2,
19655 y: first.y + (second.y - first.y) / 2
19713 x: mid.x - size.width / 2,
19714 y: mid.y - size.height / 2
19785 * Add bpmn element (semantic) to the canvas onto the
19788 BpmnImporter.prototype.add = function(semantic, parentElement) {
19802 // add a virtual element (not being drawn)
19926 if (attachers.indexOf(boundaryElement) === -1) {
19933 * add label for an element
20096 // button === 0 -> left áka primary mouse button
20102 // button === 1 -> auxiliary áka wheel button
20265 var ELEMENT_SELECTOR = 'svg, .djs-element';
20323 // Update djs-hit on change.
20324 // A low priortity is necessary, because djs-hit of labels has to be updated
20354 var STROKE_HIT_STYLE = createHitStyle('djs-hit djs-hit-stroke');
20356 var CLICK_STROKE_HIT_STYLE = createHitStyle('djs-hit djs-hit-click-stroke');
20358 var ALL_HIT_STYLE = createHitStyle('djs-hit djs-hit-all');
20362 'click-stroke': CLICK_STROKE_HIT_STYLE,
20373 return styles.cls(classNames, [ 'no-fill', 'no-border' ], attrs);
20405 var hits = all('.djs-hit', gfx);
20492 var hit = query('.djs-hit', gfx);
20628 var OUTLINE_STYLE = styles.cls('djs-outline', [ 'no-fill' ]);
20653 var outline = query('.djs-outline', gfx);
20666 var outline = query('.djs-outline', gfx);
20687 x: -this.offset,
20688 y: -this.offset,
20708 x: bbox.x - this.offset,
20709 y: bbox.y - this.offset,
20759 if (idx !== -1) {
20774 return this._selectedElements.indexOf(element) !== -1;
20781 * By passing an additional add parameter you can decide whether or not the element(s)
20787 …* @param {boolean} [add] whether the element(s) should be appended to the current selection, defa…
20789 Selection.prototype.select = function(elements, add) { argument
20807 if (add) {
20809 if (selectedElements.indexOf(element) !== -1) {
20874 if (newSelection.indexOf(e) === -1) {
20880 if (oldSelection.indexOf(e) === -1) {
20964 // Add to selection if CTRL or SHIFT pressed
20965 var add = hasPrimaryModifier(event) || hasSecondaryModifier(event);
20968 if (add) {
20980 selection.select(element, add);
21026 this._prefix = (prefix ? prefix + '-' : '') + Math.floor(Math.random() * 1000000000) + '-';
21053 * // add a pink badge on the top left of the shape
21054 * overlays.add(someShape, {
21056 * top: -5,
21057 * left: -5
21062 * // or add via shape id
21064 * overlays.add('some-element-id', {
21066 * top: -5,
21067 * left: -5
21072 * // or add with optional type
21074 * overlays.add(someShape, 'badge', {
21076 * top: -5,
21077 * left: -5
21085 * var id = overlays.add(...);
21128 * Mapping overlayId -> overlay
21133 * Mapping elementId -> overlay container
21159 * overlays.get('some-id');
21168 * overlays.get({ element: 'element-id', type: 'badge' });
21230 Overlays.prototype.add = function(element, type, overlay) {
21302 if (idx !== -1) {
21346 attr$1(container.html, 'data-container-id', element.id);
21373 left = position.right * -1 + width;
21386 top = position.bottom * -1 + height;
21394 var html = domify('<div class="djs-overlays" style="position: absolute" />');
21421 -1 * viewbox.x * scale,
21422 -1 * viewbox.y * scale
21465 …htmlContainer = domify('<div class="djs-overlay" data-overlay-id="' + id + '" style="position: abs…
21470 classes$1(htmlContainer).add('djs-overlay-' + overlay.type);
21599 if (i !== -1) {
21623 // marker integration, simply add them on the overlays as classes, too.
21628 classes$1(container.html)[e.add ? 'add' : 'remove'](e.marker);
21650 '<div class="djs-overlay-container" style="position: absolute; width: 0; height: 0;" />'
21668 el.style['transform-origin'] = 'top left';
21670 [ '', '-ms-', '-webkit-' ].forEach(function(prefix) {
21775 return keys.indexOf(event.key) !== -1 || keys.indexOf(event.keyCode) !== -1;
21788 var HANDLE_MODIFIER_ATTRIBUTE = 'input-handle-modified-keys';
21803 * - keyboard.bind
21804 * - keyboard.unbind
21805 * - keyboard.init
21806 * - keyboard.destroy
21938 * Add a listener function that is notified with `KeyboardEvent` whenever
22022 * Add keyboard binding if respective editor action
22096 // cf: https://github.com/bpmn-io/bpmn-js/issues/1362#issuecomment-722989754
22097 if (isKey([ '+', 'Add', '=' ], event) && isCmd(event)) {
22105 // CTRL + -
22110 if (isKey([ '-', 'Subtract' ], event) && isCmd(event)) {
22111 editorActions.trigger('stepZoom', { value: -1 });
22246 dx = -actualSpeed;
22249 dy = -actualSpeed;
22276 var CURSOR_CLS_PATTERN = /^djs-cursor-.*$/;
22285 classes.add('djs-cursor-' + mode);
22325 x: a.x - b.x,
22326 y: a.y - b.y
22399 // event is already handled by '.djs-draggable'
22400 if (closest(event.target, '.djs-draggable')) {
22478 return n >= 0 ? 1 : -1;
22534 this._canvas.zoom('fit-viewport');
22548 // add until threshold reached
22562 // event is already handled by '.djs-scrollable'
22563 if (closest(event.target, '.djs-scrollable', true)) {
22578 var factor = -1 * this._scale,
22591 x: event.clientX - elementRect.left,
22592 y: event.clientY - elementRect.top
22625 * @param {number} delta - Zoom delta (1 for zooming in, -1 for out).
22646 var direction = delta > 0 ? 1 : -1;
22683 // add or remove wheel listener based on
22728 /*! Hammer.JS - v2.0.7 - 2016-04-22
22812 var e = new Error('get-stack-trace');
22990 return str.indexOf(find) > -1;
23020 return -1;
23025 * convert array-like objects to real arrays
23225 var isFirst = (eventType & INPUT_START && (pointersLen - changedPointersLen === 0));
23226 …var isFinal = (eventType & (INPUT_END | INPUT_CANCEL) && (pointersLen - changedPointersLen === 0));
23277 input.deltaTime = input.timeStamp - firstInput.timeStamp;
23324 input.deltaX = prevDelta.x + (center.x - offset.x);
23325 input.deltaY = prevDelta.y + (center.y - offset.y);
23335 deltaTime = input.timeStamp - last.timeStamp,
23339 var deltaX = input.deltaX - last.deltaX;
23340 var deltaY = input.deltaY - last.deltaY;
23461 var x = p2[props[0]] - p1[props[0]],
23462 y = p2[props[1]] - p1[props[1]];
23478 var x = p2[props[0]] - p1[props[0]],
23479 y = p2[props[1]] - p1[props[1]];
23581 // IE10 has prefixed support, and case-sensitive
23623 storeIndex = store.length - 1;
23690 if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) {
23730 * Multi-user touch events input
23858 // when we're in a touch event, record touches to de-dupe synthetic mouse event
23895 if (i > -1) {
23907 var dx = Math.abs(x - t.x), dy = Math.abs(y - t.y);
23923 var TOUCH_ACTION_PAN_X = 'pan-x';
23924 var TOUCH_ACTION_PAN_Y = 'pan-y';
23945 // find out the touch-action by the event handlers
23957 * just re-set the touchAction value
24009 // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent
24044 // if both pan-x and pan-y are set (different recognizers
24046 // we need none (as otherwise with pan-x pan-y combined none of these
24052 // pan-x OR pan-y
24071 ['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach(function(val) {
24073 // If css.supports is not supported but there is native touch-action assume it supports
24075 touchMap[val] = cssSupports ? window.CSS.supports('touch-action', val) : true;
24084 * Example session for mouse-input: mousedown -> mousemove -> mouseup
24094 * +-----+---------------+
24096 * +-----+-----+ |
24099 * +-------+------+
24203 if (inArray(requireFail, otherRecognizer) === -1) {
24222 if (index > -1) {
24344 * return the preferred touch-action
24551 …* Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-o…
24576 (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN);
24748 …* between the given interval and position. The delay option can be used to recognize multi-taps wi…
24752 * multi-taps being recognized.
24778 interval: 300, // max time between the multi-tap taps
24781 posThreshold: 10 // a multi-tap can be a bit off the initial position
24808 … var validInterval = this.pTime ? (input.timeStamp - this.pTime < options.interval) : true;
24906 * EXPERIMENTAL FEATURE -- can be removed/changed
24939 * Add them to this method and they will be set when creating a new Manager.
25016 var recognizer = this.add(new (item[0])(item[1]));
25066 // run the touch-action polyfill
25130 * add a recognizer to the manager
25135 add: function(recognizer) { method
25136 if (invokeArrayArg(recognizer, 'add', this)) {
25170 if (index !== -1) {
25267 * add/remove the css properties as defined in manager.options.cssProps
25269 * @param {Boolean} add
25271 function toggleCssProps(manager, add) { argument
25279 if (add) {
25286 if (!add) {
25452 recognizer.add([ pan, press, pinch, doubleTap, tap ]);
25512 var node = closest(target, 'svg, .djs-element', true);
25531 var dx = e.deltaX - lx,
25532 dy = e.deltaY - ly;
25571 var ratio = 1 - (1 - e.scale) / 1.50,
25712 class: 'outer-bound-marker'
25717 x: -10000,
25752 return arr && arr[arr.length - 1];
25803 if (vertical.indexOf(type) !== -1) {
25815 return types.indexOf(type) !== -1;
25984 connectedAtPosition[ axis ] + margin - element[ dimension ] / 2,
25985 previousPosition[ axis ] - minDistance + margin
26008 x: position.x - (element.width / 2),
26009 y: position.y - (element.height / 2),
26030 * Assumes left-to-right and top-to-down modeling.
26050 return connection.source === source ? 1 : -1;
26067 return asTRBL(a).top - asTRBL(b).bottom;
26069 return asTRBL(a).top - getMid(b).y;
26071 return asTRBL(a).top - asTRBL(b).top;
26075 return asTRBL(a).left - asTRBL(b).right;
26077 return asTRBL(a).left - getMid(b).x;
26079 return asTRBL(a).left - asTRBL(b).left;
26083 return asTRBL(b).top - asTRBL(a).bottom;
26085 return getMid(b).y - asTRBL(a).bottom;
26087 return asTRBL(b).bottom - asTRBL(a).bottom;
26091 return asTRBL(b).left - asTRBL(a).right;
26093 return getMid(b).x - asTRBL(a).right;
26095 return asTRBL(b).right - asTRBL(a).right;
26167 * - connected elements
26168 * - host connected elements
26169 * - attachers connected elements
26411 orientation = getOrientation(source, source.host, -25);
26413 if (orientation.indexOf('top') !== -1) {
26414 margin *= -1;
26435 if (orientation.indexOf('top') != -1) {
26436 return -1 * minDistance;
26437 } else if (orientation.indexOf('bottom') != -1) {
26454 y: sourceTrbl.top - 50 - element.height / 2
26459 margin: -30,
26476 x: sourceTrbl.right - 10 + element.width / 2,
26491 * BPMN auto-place behavior.
26515 * A utility that can be used to plug-in into the command execution for
26524 * import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';
26530 * console.log('command pre-execute', event);
26771 if (elementsTrbl.top - targetTrbl.top < padding.top) {
26772 newTrbl.top = elementsTrbl.top - offset.top;
26775 if (elementsTrbl.left - targetTrbl.left < padding.left) {
26776 newTrbl.left = elementsTrbl.left - offset.left;
26779 if (targetTrbl.right - elementsTrbl.right < padding.right) {
26783 if (targetTrbl.bottom - elementsTrbl.bottom < padding.bottom) {
26950 * Extensions should implement the init method to actually add their custom
27027 * Implement this method to add new rules during provider initialization.
27120 * @see http://stackoverflow.com/questions/7448468/why-cant-i-reliably-capture-a-mouseout-event
27162 // 3) re-trigger move event
27263 return closest(target, 'svg, .djs-element', true);
27275 var DRAG_ACTIVE_CLS = 'djs-drag-active';
27295 * the general "drag-and-drop" look and feel.
27311 * ## Life-cycle events
27325 * life-cycle events with the `drag.` prefix _and_ events namespaced
27392 x: viewbox.x + (globalPosition.x - clientRect.left) / viewbox.scale,
27393 y: viewbox.y + (globalPosition.y - clientRect.top) / viewbox.scale
27591 // life-cycle methods
27743 // add dom listeners
27878 clientRect.width - point.x,
27879 clientRect.height - point.y
27894 dx = -opts.scrollStep;
27896 dy = -opts.scrollStep;
27949 x: globalPosition.x - clientRect.left,
27950 y: globalPosition.y - clientRect.top
28024 ['m', 0, -r],
28026 ['a', r, r, 0, 1, 1, 0, -2 * r],
28067 b = intersections[intersections.length - 1],
28083 idx = max$6(a.segment2, b.segment2) - 1;
28122 var BENDPOINT_CLS = 'djs-bendpoint';
28123 var SEGMENT_DRAGGER_CLS = 'djs-segment-dragger';
28143 x: viewbox.x + (position.x - offset.x) / viewbox.scale,
28144 y: viewbox.y + (position.y - offset.y) / viewbox.scale
28157 classes(groupGfx).add(BENDPOINT_CLS);
28167 classes(visual).add('djs-visual');
28177 classes(hit).add('djs-hit');
28182 classes(groupGfx).add(cls);
28201 x: -width / 2,
28202 y: -height / 2,
28206 classes(visual).add('djs-visual');
28212 x: -hitWidth / 2,
28213 y: -hitHeight / 2,
28217 classes(hit).add('djs-hit');
28237 classes(groupGfx).add(SEGMENT_DRAGGER_CLS);
28238 classes(groupGfx).add(alignment === 'h' ? 'horizontal' : 'vertical');
28258 var segmentLengthXAxis = segmentEnd.x - segmentStart.x,
28259 segmentLengthYAxis = segmentEnd.y - segmentStart.y;
28283 // https://drafts.csswg.org/cssom/#serialize-an-identifier
28290 var index = -1;
28296 // Note: there’s no need to special-case astral symbols, surrogate
28307 // If the character is in the range [\1-\1F] (U+0001 to U+001F) or is
28310 // If the character is the first character and is in the range [0-9]
28313 // If the character is the second character and is in the range [0-9]
28314 // (U+0030 to U+0039) and the first character is a `-` (U+002D), […]
28321 // https://drafts.csswg.org/cssom/#escape-a-character-as-code-point
28327 // If the character is the first character and is a `-` (U+002D), and
28338 // greater than or equal to U+0080, is `-` (U+002D) or `_` (U+005F), or
28339 // is in one of the ranges [0-9] (U+0030 to U+0039), [A-Z] (U+0041 to
28340 // U+005A), or [a-z] (U+0061 to U+007A), […]
28355 // https://drafts.csswg.org/cssom/#escape-a-character
28410 p0 = waypoints[idx - 1];
28414 xDelta = Math.abs(p.x - mid.x);
28415 yDelta = Math.abs(p.y - mid.y);
28421 * Calculates the threshold from a connection's middle which fits the two-third-region
28433 start: waypoints[intersection.index - 1],
28444 segmentLength = relevantSegment.end.x - relevantSegment.start.x;
28446 segmentLength = relevantSegment.end.y - relevantSegment.start.y;
28487 gfx = query('.djs-bendpoints[data-element-id="' + cssEscape(element.id) + '"]', layer);
28491 attr(gfx, { 'data-element-id': element.id });
28492 classes(gfx).add('djs-bendpoints');
28506 '.djs-segment-dragger[data-segment-idx="' + idx + '"]',
28520 // add floating bendpoint
28534 segmentStart = waypoints[i - 1];
28540 attr(segmentDraggerGfx, { 'data-segment-idx': i });
28600 segmentStart = waypoints[intersection.index - 1],
28614 x: point.x - mid.x,
28615 y: point.y - mid.y
28653 if (event.add) {
28654 classes(bendpointsGfx).add(event.marker);
28732 attr(bendpointContainer, { 'data-element-id': newId });
28758 return query('.djs-visual', draggerGfx);
28769 * Move bendpoints through drag and drop to add/remove bendpoints or reconnect connection.
28784 if (!insert && bendpointIndex === waypoints.length - 1) {
29004 var MARKER_OK$4 = 'connect-ok',
29005 MARKER_NOT_OK$4 = 'connect-not-ok',
29006 MARKER_CONNECT_HOVER$1 = 'connect-hover',
29007 MARKER_CONNECT_UPDATING$1 = 'djs-updating',
29008 MARKER_ELEMENT_HIDDEN = 'djs-element-hidden';
29038 // add dragger gfx
29041 classes(draggerGfx).add('djs-dragging');
29193 var MARKER_CONNECT_HOVER = 'connect-hover',
29194 MARKER_CONNECT_UPDATING = 'djs-updating';
29215 var fencedValue = Math.min(Math.max(minValue + padding, position[axis]), maxValue - padding);
29267 segmentStartIndex = idx - 1,
29289 if (segmentEndIndex === waypoints.length - 1) {
29315 cursor: axis === 'x' ? 'resize-ew' : 'resize-ns',
29390 if (pointsOnLine(waypoints[idx - 1], waypoints[idx + 1], r)) {
29393 segmentOffset = idx <= segmentStartIndex ? segmentOffset - 1 : segmentOffset;
29415 // add dragger gfx
29417 classes(context.draggerGfx).add('djs-dragging');
29459 segmentOffset--;
29463 // docking point, add segment if not intersecting anymore
29473 if (segmentEndIndex > waypointCount - 3) {
29477 if (segmentEndIndex === waypointCount - 2) {
29481 newWaypoints[newWaypoints.length - 1] = newSegmentEnd;
29617 if (abs$6(snapValue - value) <= tolerance) {
29707 delta = value - previousValue;
29740 while (i--) if (abs$5(values[i] - value) <= TOLERANCE) {
29748 return value - rem;
29751 if (rem > values - TOLERANCE) {
29752 return value - rem + values;
29786 waypoints[segmentStartIndex - 1],
29796 if (segmentEndIndex > waypoints.length - 3) {
29805 // not placeholders that are inserted during add
29839 var cx = (x - sx),
29840 cy = (y - sy);
29844 dx: event.dx - cx,
29845 dy: event.dy - cy,
29851 if (cx || snapPoints.vertical.indexOf(x) !== -1) {
29855 if (cy || snapPoints.horizontal.indexOf(y) !== -1) {
29873 var referenceWaypoints = [ waypoints[bendpointIndex - 1], waypoints[bendpointIndex + 1] ];
29880 // not placeholders that are inserted during add
29912 var cx = (x - sx),
29913 cy = (y - sy);
29917 dx: event.dx - cx,
29918 dy: event.dy - cy,
29919 x: event.x - cx,
29920 y: event.y - cy
29924 if (cx || snapPoints.vertical.indexOf(x) !== -1) {
29928 if (cy || snapPoints.horizontal.indexOf(y) !== -1) {
30093 var MARKER_OK$3 = 'connect-ok',
30094 MARKER_NOT_OK$3 = 'connect-not-ok';
30184 var MARKER_CONNECTION_PREVIEW = 'djs-connection-preview';
30375 * Add and return preview graphics.
30386 classes(gfx).add(MARKER_CONNECTION_PREVIEW);
30408 'pointer-events': 'none'
30493 * resize-handle
30504 '<div class="djs-direct-editing-parent">' +
30505 '<div class="djs-direct-editing-content" contenteditable="true"></div>' +
30579 boxSizing: 'border-box',
30598 boxSizing: 'border-box',
30601 wordWrap: 'break-word'
30608 transform: 'translate(0, -50%)'
30751 content.scrollHeight < parent.offsetHeight - fontSize) {
30761 dy: height - bounds.height
30782 '<div class="djs-direct-editing-resize-handle"></div>'
30807 var newWidth = min$3(max$5(startWidth + e.clientX - startX, minWidth), maxWidth);
30808 var newHeight = min$3(max$5(startHeight + e.clientY - startY, minHeight), maxHeight);
30816 dx: e.clientX - startX,
30817 dy: e.clientY - startY
30836 cursor: 'nwse-resize',
31010 x: newBounds.left - containerBounds.left,
31011 y: newBounds.top - containerBounds.top,
31133 right: -9,
31134 top: -6
31205 * 'entry-1': {
31278 entry = entries[attr$1(button, 'data-action')];
31337 attr$1(control, 'data-action', id);
31339 container = query('[data-group=' + grouping + ']', html);
31341 container = domify('<div class="group" data-group="' + grouping + '"></div>');
31360 classes$1(html).add('open');
31381 var html = domify('<div class="djs-context-pad"></div>');
31400 this._overlayId = overlays.add(element, 'context-pad', overlaysConfig);
31449 classes.add(cls);
31462 'marker-start',
31463 'marker-mid',
31464 'marker-end'
31535 attr(dragger, this._styles.cls('djs-dragger', [], {
31556 class: 'djs-resize-overlay',
31614 var clonedMarkerId = markerId + '-clone';
31619 .add('djs-dragger')
31620 .add('djs-dragger-marker');
31688 return NODES_CAN_HAVE_MARKER.indexOf(node.nodeName) !== -1;
31696 var MARKER_OK$2 = 'drop-ok',
31697 MARKER_NOT_OK$2 = 'drop-not-ok',
31698 MARKER_ATTACH$2 = 'attach-ok',
31699 MARKER_NEW_PARENT$1 = 'new-parent';
31744 return !element.parent && !(isLabel$5(element) && elements.indexOf(labelTarget) !== -1);
31977 x: waypoint.x - bbox.x - bbox.width / 2,
31978 y: waypoint.y - bbox.y - bbox.height / 2
31984 x: element.x - bbox.x - bbox.width / 2,
31985 y: element.y - bbox.y - bbox.height / 2
32061 attr(dragGroup, styles.cls('djs-drag-group', [ 'no-events' ]));
32086 // add preview
32153 var DATA_REF = 'data-id';
32211 * 'entry-1': {
32308 this._createEntries(headerEntries, 'djs-popup-header')
32314 this._createEntries(entries, 'djs-popup-body')
32491 var container = domify('<div class="djs-popup">'),
32502 classes$1(container).add(className);
32592 x: cursor.x - clientRect.left,
32593 y: cursor.y - clientRect.top
32605 left = cursorPosition.x - containerWidth + 'px';
32606 top = cursorPosition.y - containerHeight + 'px';
32608 left = cursorPosition.x - containerWidth + 'px';
32615 top = cursorPosition.y - containerHeight + 'px';
32618 assign(container.style, { left: left, top: top }, { visibility: 'visible', 'z-index': 1000 });
32635 classes$1(entriesContainer).add(className);
32658 entryClasses.add('entry');
32662 entryClasses.add(className);
32679 entryClasses.add('active');
32683 entryClasses.add('disabled');
32703 * Remove the auto-closing listener.
32714 element.style['transform-origin'] = 'top left';
32716 [ '', '-ms-', '-webkit-' ].forEach(function(prefix) {
32828 * @returns {Array<djs.model.Base>|boolean} - Return elements to be copied or false to disallow
32853 * @param {Object} context.cache - Already created elements.
32861 * @param {Object} context.hints - Add hints before pasting.
33012 * @param {djs.model.base} [context.element] - Parent.
33013 * @param {Point} [context.point] - Position.
33014 * @param {Object} [context.hints] - Hints.
33069 x: waypoint.x - bbox.x - bbox.width / 2,
33070 y: waypoint.y - bbox.y - bbox.height / 2
33076 x: element.x - bbox.x - bbox.width / 2,
33077 y: element.y - bbox.y - bbox.height / 2
33206 * Create a tree-like structure from elements.
33249 // (2) add element if not already added
33273 if (index !== -1) {
33280 // (1) add elements
33283 // do NOT add external labels directly
33296 // add external labels
33398 if (index === -1) {
33461 'background-color',
33462 'border-color',
33601 * @returns {Array<string>|boolean} - Return properties to be copied or false to disallow
33613 * @returns {*|boolean} - Return copied property or false to disallow
33625 * @returns {boolean} - Return false to disallow
33660 if (propertyName && DISALLOWED_PROPERTIES.indexOf(propertyName) !== -1) {
33886 * @param {Element} oldElement - Element to be replaced
33887 * @param {Object} newElementData - Containing information about the new element,
33889 …* @param {Object} options - Custom options that will be attached to the context. It can be used t…
34140 // retain default flow's reference between inclusive <-> exclusive gateways and activities
34170 newElement.x = element.x + (element.width - newElement.width) / 2;
34179 'background-color',
34180 'border-color',
34225 return a2.indexOf(el) !== -1;
34277 actionName: 'replace-with-none-start',
34278 className: 'bpmn-icon-start-event-none',
34285 actionName: 'replace-with-none-intermediate-throwing',
34286 className: 'bpmn-icon-intermediate-event-none',
34293 actionName: 'replace-with-none-end',
34294 className: 'bpmn-icon-end-event-none',
34301 actionName: 'replace-with-message-start',
34302 className: 'bpmn-icon-start-event-message',
34310 actionName: 'replace-with-timer-start',
34311 className: 'bpmn-icon-start-event-timer',
34319 actionName: 'replace-with-conditional-start',
34320 className: 'bpmn-icon-start-event-condition',
34328 actionName: 'replace-with-signal-start',
34329 className: 'bpmn-icon-start-event-signal',
34340 actionName: 'replace-with-none-start',
34341 className: 'bpmn-icon-start-event-none',
34348 actionName: 'replace-with-none-intermediate-throwing',
34349 className: 'bpmn-icon-intermediate-event-none',
34356 actionName: 'replace-with-none-end',
34357 className: 'bpmn-icon-end-event-none',
34367 actionName: 'replace-with-none-start',
34368 className: 'bpmn-icon-start-event-none',
34375 actionName: 'replace-with-none-intermediate-throw',
34376 className: 'bpmn-icon-intermediate-event-none',
34383 actionName: 'replace-with-none-end',
34384 className: 'bpmn-icon-end-event-none',
34391 actionName: 'replace-with-message-intermediate-catch',
34392 className: 'bpmn-icon-intermediate-event-catch-message',
34400 actionName: 'replace-with-message-intermediate-throw',
34401 className: 'bpmn-icon-intermediate-event-throw-message',
34409 actionName: 'replace-with-timer-intermediate-catch',
34410 className: 'bpmn-icon-intermediate-event-catch-timer',
34418 actionName: 'replace-with-escalation-intermediate-throw',
34419 className: 'bpmn-icon-intermediate-event-throw-escalation',
34427 actionName: 'replace-with-conditional-intermediate-catch',
34428 className: 'bpmn-icon-intermediate-event-catch-condition',
34436 actionName: 'replace-with-link-intermediate-catch',
34437 className: 'bpmn-icon-intermediate-event-catch-link',
34448 actionName: 'replace-with-link-intermediate-throw',
34449 className: 'bpmn-icon-intermediate-event-throw-link',
34460 actionName: 'replace-with-compensation-intermediate-throw',
34461 className: 'bpmn-icon-intermediate-event-throw-compensation',
34469 actionName: 'replace-with-signal-intermediate-catch',
34470 className: 'bpmn-icon-intermediate-event-catch-signal',
34478 actionName: 'replace-with-signal-intermediate-throw',
34479 className: 'bpmn-icon-intermediate-event-throw-signal',
34490 actionName: 'replace-with-none-start',
34491 className: 'bpmn-icon-start-event-none',
34498 actionName: 'replace-with-none-intermediate-throw',
34499 className: 'bpmn-icon-intermediate-event-none',
34506 actionName: 'replace-with-none-end',
34507 className: 'bpmn-icon-end-event-none',
34514 actionName: 'replace-with-message-end',
34515 className: 'bpmn-icon-end-event-message',
34523 actionName: 'replace-with-escalation-end',
34524 className: 'bpmn-icon-end-event-escalation',
34532 actionName: 'replace-with-error-end',
34533 className: 'bpmn-icon-end-event-error',
34541 actionName: 'replace-with-cancel-end',
34542 className: 'bpmn-icon-end-event-cancel',
34550 actionName: 'replace-with-compensation-end',
34551 className: 'bpmn-icon-end-event-compensation',
34559 actionName: 'replace-with-signal-end',
34560 className: 'bpmn-icon-end-event-signal',
34568 actionName: 'replace-with-terminate-end',
34569 className: 'bpmn-icon-end-event-terminate',
34580 actionName: 'replace-with-exclusive-gateway',
34581 className: 'bpmn-icon-gateway-xor',
34588 actionName: 'replace-with-parallel-gateway',
34589 className: 'bpmn-icon-gateway-parallel',
34596 actionName: 'replace-with-inclusive-gateway',
34597 className: 'bpmn-icon-gateway-or',
34604 actionName: 'replace-with-complex-gateway',
34605 className: 'bpmn-icon-gateway-complex',
34612 actionName: 'replace-with-event-based-gateway',
34613 className: 'bpmn-icon-gateway-eventbased',
34621 // Gateways deactivated until https://github.com/bpmn-io/bpmn-js/issues/194
34624 // actionName: 'replace-with-exclusive-event-based-gateway',
34625 // className: 'bpmn-icon-exclusive-event-based',
34635 // actionName: 'replace-with-parallel-event-based-instantiate-gateway',
34636 // className: 'bpmn-icon-parallel-event-based-instantiate-gateway',
34649 actionName: 'replace-with-transaction',
34650 className: 'bpmn-icon-transaction',
34658 actionName: 'replace-with-event-subprocess',
34659 className: 'bpmn-icon-event-subprocess-expanded',
34668 actionName: 'replace-with-collapsed-subprocess',
34669 className: 'bpmn-icon-subprocess-collapsed',
34680 actionName: 'replace-with-subprocess',
34681 className: 'bpmn-icon-subprocess-expanded',
34689 actionName: 'replace-with-event-subprocess',
34690 className: 'bpmn-icon-event-subprocess-expanded',
34702 actionName: 'replace-with-subprocess',
34703 className: 'bpmn-icon-subprocess-expanded',
34711 actionName: 'replace-with-transaction',
34712 className: 'bpmn-icon-transaction',
34723 actionName: 'replace-with-task',
34724 className: 'bpmn-icon-task',
34731 actionName: 'replace-with-send-task',
34732 className: 'bpmn-icon-send',
34739 actionName: 'replace-with-receive-task',
34740 className: 'bpmn-icon-receive',
34747 actionName: 'replace-with-user-task',
34748 className: 'bpmn-icon-user',
34755 actionName: 'replace-with-manual-task',
34756 className: 'bpmn-icon-manual',
34763 actionName: 'replace-with-rule-task',
34764 className: 'bpmn-icon-business-rule',
34771 actionName: 'replace-with-service-task',
34772 className: 'bpmn-icon-service',
34779 actionName: 'replace-with-script-task',
34780 className: 'bpmn-icon-script',
34787 actionName: 'replace-with-call-activity',
34788 className: 'bpmn-icon-call-activity',
34795 actionName: 'replace-with-collapsed-subprocess',
34796 className: 'bpmn-icon-subprocess-collapsed',
34804 actionName: 'replace-with-expanded-subprocess',
34805 className: 'bpmn-icon-subprocess-expanded',
34816 actionName: 'replace-with-data-store-reference',
34817 className: 'bpmn-icon-data-store',
34827 actionName: 'replace-with-data-object-reference',
34828 className: 'bpmn-icon-data-object',
34838 actionName: 'replace-with-message-boundary',
34839 className: 'bpmn-icon-intermediate-event-catch-message',
34847 actionName: 'replace-with-timer-boundary',
34848 className: 'bpmn-icon-intermediate-event-catch-timer',
34856 actionName: 'replace-with-escalation-boundary',
34857 className: 'bpmn-icon-intermediate-event-catch-escalation',
34865 actionName: 'replace-with-conditional-boundary',
34866 className: 'bpmn-icon-intermediate-event-catch-condition',
34874 actionName: 'replace-with-error-boundary',
34875 className: 'bpmn-icon-intermediate-event-catch-error',
34883 actionName: 'replace-with-cancel-boundary',
34884 className: 'bpmn-icon-intermediate-event-catch-cancel',
34892 actionName: 'replace-with-signal-boundary',
34893 className: 'bpmn-icon-intermediate-event-catch-signal',
34901 actionName: 'replace-with-compensation-boundary',
34902 className: 'bpmn-icon-intermediate-event-catch-compensation',
34909 label: 'Message Boundary Event (non-interrupting)',
34910 actionName: 'replace-with-non-interrupting-message-boundary',
34911 className: 'bpmn-icon-intermediate-event-catch-non-interrupting-message',
34919 label: 'Timer Boundary Event (non-interrupting)',
34920 actionName: 'replace-with-non-interrupting-timer-boundary',
34921 className: 'bpmn-icon-intermediate-event-catch-non-interrupting-timer',
34929 label: 'Escalation Boundary Event (non-interrupting)',
34930 actionName: 'replace-with-non-interrupting-escalation-boundary',
34931 className: 'bpmn-icon-intermediate-event-catch-non-interrupting-escalation',
34939 label: 'Conditional Boundary Event (non-interrupting)',
34940 actionName: 'replace-with-non-interrupting-conditional-boundary',
34941 className: 'bpmn-icon-intermediate-event-catch-non-interrupting-condition',
34949 label: 'Signal Boundary Event (non-interrupting)',
34950 actionName: 'replace-with-non-interrupting-signal-boundary',
34951 className: 'bpmn-icon-intermediate-event-catch-non-interrupting-signal',
34963 actionName: 'replace-with-message-start',
34964 className: 'bpmn-icon-start-event-message',
34972 actionName: 'replace-with-timer-start',
34973 className: 'bpmn-icon-start-event-timer',
34981 actionName: 'replace-with-conditional-start',
34982 className: 'bpmn-icon-start-event-condition',
34990 actionName: 'replace-with-signal-start',
34991 className: 'bpmn-icon-start-event-signal',
34999 actionName: 'replace-with-error-start',
35000 className: 'bpmn-icon-start-event-error',
35008 actionName: 'replace-with-escalation-start',
35009 className: 'bpmn-icon-start-event-escalation',
35017 actionName: 'replace-with-compensation-start',
35018 className: 'bpmn-icon-start-event-compensation',
35025 label: 'Message Start Event (non-interrupting)',
35026 actionName: 'replace-with-non-interrupting-message-start',
35027 className: 'bpmn-icon-start-event-non-interrupting-message',
35035 label: 'Timer Start Event (non-interrupting)',
35036 actionName: 'replace-with-non-interrupting-timer-start',
35037 className: 'bpmn-icon-start-event-non-interrupting-timer',
35045 label: 'Conditional Start Event (non-interrupting)',
35046 actionName: 'replace-with-non-interrupting-conditional-start',
35047 className: 'bpmn-icon-start-event-non-interrupting-condition',
35055 label: 'Signal Start Event (non-interrupting)',
35056 actionName: 'replace-with-non-interrupting-signal-start',
35057 className: 'bpmn-icon-start-event-non-interrupting-signal',
35065 label: 'Escalation Start Event (non-interrupting)',
35066 actionName: 'replace-with-non-interrupting-escalation-start',
35067 className: 'bpmn-icon-start-event-non-interrupting-escalation',
35079 actionName: 'replace-with-sequence-flow',
35080 className: 'bpmn-icon-connection'
35084 actionName: 'replace-with-default-flow',
35085 className: 'bpmn-icon-default-flow'
35089 actionName: 'replace-with-conditional-flow',
35090 className: 'bpmn-icon-conditional-flow'
35097 actionName: 'replace-with-expanded-pool',
35098 className: 'bpmn-icon-participant',
35114 actionName: 'replace-with-collapsed-pool',
35117 className: 'bpmn-icon-lane',
35158 this._popupMenu.registerProvider('bpmn-replace', this);
35434 case 'replace-with-default-flow':
35446 case 'replace-with-conditional-flow':
35561 id: 'toggle-parallel-mi',
35562 className: 'bpmn-icon-parallel-mi-marker',
35572 id: 'toggle-sequential-mi',
35573 className: 'bpmn-icon-sequential-mi-marker',
35583 id: 'toggle-loop',
35584 className: 'bpmn-icon-loop-marker',
35620 id: 'toggle-is-collection',
35621 className: 'bpmn-icon-parallel-mi-marker',
35660 id: 'toggle-participant-multiplicity',
35661 className: 'bpmn-icon-parallel-mi-marker',
35687 id: 'toggle-adhoc',
35688 className: 'bpmn-icon-ad-hoc-marker',
35689 title: translate('Ad-hoc'),
35734 top: trblA.top - trblB.top,
35735 right: trblA.right - trblB.right,
35736 bottom: trblA.bottom - trblB.bottom,
35737 left: trblA.left - trblB.left
35761 if (direction.indexOf('n') !== -1) {
35763 newBounds.height = bounds.height - dy;
35764 } else if (direction.indexOf('s') !== -1) {
35768 if (direction.indexOf('e') !== -1) {
35770 } else if (direction.indexOf('w') !== -1) {
35772 newBounds.width = bounds.width - dx;
35792 width: bounds.width - (resize.left || 0) + (resize.right || 0),
35793 height: bounds.height - (resize.top || 0) + (resize.bottom || 0)
35837 top: /n/.test(direction) ? currentBox.bottom - minDimensions.height : currentBox.top,
35838 left: /w/.test(direction) ? currentBox.right - minDimensions.width : currentBox.left,
35876 x: bbox.x - left,
35877 y: bbox.y - top,
36040 if (abs$4(otherTrbl.bottom - shapeTrbl.top) < 10) {
36041 bottomResize = shapeNewTrbl.top - otherTrbl.bottom;
36044 if (abs$4(otherTrbl.top - shapeTrbl.top) < 5) {
36045 topResize = shapeNewTrbl.top - otherTrbl.top;
36050 if (abs$4(otherTrbl.top - shapeTrbl.bottom) < 10) {
36051 topResize = shapeNewTrbl.bottom - otherTrbl.top;
36054 if (abs$4(otherTrbl.bottom - shapeTrbl.bottom) < 5) {
36055 bottomResize = shapeNewTrbl.bottom - otherTrbl.bottom;
36178 var top = padRect.top - diagramRect.top;
36179 var left = padRect.left - diagramRect.left;
36253 'lane-insert-above': {
36254 group: 'lane-insert-above',
36255 className: 'bpmn-icon-lane-insert-above',
36256 title: translate('Add Lane above'),
36269 'lane-divide-two': {
36270 group: 'lane-divide',
36271 className: 'bpmn-icon-lane-divide-two',
36282 'lane-divide-three': {
36283 group: 'lane-divide',
36284 className: 'bpmn-icon-lane-divide-three',
36295 'lane-insert-below': {
36296 group: 'lane-insert-below',
36297 className: 'bpmn-icon-lane-insert-below',
36298 title: translate('Add Lane below'),
36314 'append.receive-task': appendAction(
36316 'bpmn-icon-receive-task',
36319 'append.message-intermediate-event': appendAction(
36321 'bpmn-icon-intermediate-event-catch-message',
36325 'append.timer-intermediate-event': appendAction(
36327 'bpmn-icon-intermediate-event-catch-timer',
36331 'append.condition-intermediate-event': appendAction(
36333 'bpmn-icon-intermediate-event-catch-condition',
36337 'append.signal-intermediate-event': appendAction(
36339 'bpmn-icon-intermediate-event-catch-signal',
36349 'append.compensation-activity':
36352 'bpmn-icon-task',
36367 'append.end-event': appendAction(
36369 'bpmn-icon-end-event-none',
36374 'bpmn-icon-gateway-none',
36377 'append.append-task': appendAction(
36379 'bpmn-icon-task',
36382 'append.intermediate-event': appendAction(
36384 'bpmn-icon-intermediate-event-none',
36391 if (!popupMenu.isEmpty(element, 'bpmn-replace')) {
36397 className: 'bpmn-icon-screw-wrench',
36406 popupMenu.open(element, 'bpmn-replace', position);
36422 'append.text-annotation': appendAction(
36424 'bpmn-icon-text-annotation'
36429 className: 'bpmn-icon-connection-multi',
36449 className: 'bpmn-icon-connection-multi',
36463 className: 'bpmn-icon-connection-multi',
36475 'append.text-annotation': appendAction('bpmn:TextAnnotation', 'bpmn-icon-text-annotation')
36492 className: 'bpmn-icon-trash',
36679 // sort by 'left->right' or 'top->bottom'
36686 var previous = rangeGroups[rangeGroups.length - 1];
36689 rangeGroups[rangeGroups.length - 1].elements.push(element);
36743 max: axis + dimension - THRESHOLD
36795 * It's possible to add new actions by registering them with ´registerAction´
36799 * ## Life-Cycle and configuration
37203 { x: -boundingBox.x, y: -boundingBox.y },
37235 context.gridSnappingContext.snapLocation = 'top-left';
37388 value -= offset;
37554 snapOffset[ axis ] -= shape.width / 2;
37560 snapOffset[ axis ] -= shape.height / 2;
37574 return direction.indexOf('n') !== -1;
37578 return direction.indexOf('w') !== -1;
37638 newBounds.x = shape.x + (shape.width / 2) - (newBounds.width / 2);
37639 newBounds.y = shape.y + (shape.height / 2) - (newBounds.height / 2);
37648 * @param {string} directions - Directions as {n|w|s|e}.
37668 * @param {string} directions - Directions as {n|w|s|e}.
37691 snappedNewBounds.width += gridSnapping.snapValue(newBounds.x - snappedNewBounds.x, {
37692 min: newBounds.x - snappedNewBounds.x
37698 newBounds.x = newBounds.x + newBounds.width - snappedNewBounds.width;
37712 * @param {string} directions - Directions as {n|w|s|e}.
37735 snappedNewBounds.height += gridSnapping.snapValue(newBounds.y - snappedNewBounds.y, {
37736 min: newBounds.y - snappedNewBounds.y
37742 newBounds.y = newBounds.y + newBounds.height - snappedNewBounds.height;
37777 event.x = event.x + snapped - event.dx;
37784 event.y = event.y + snapped - event.dy;
37838 options.offset = -shape.width / 2;
37840 options.offset = -shape.height / 2;
37955 for (var i = 1; i < waypoints.length - 2; i++) {
38060 * BPMN-specific hit zones and interaction fixes.
38121 // add outline hit
38122 this._interactionEvents.createBoxHit(gfx, 'click-stroke', {
38127 // add label hit
38142 // add outline hit
38143 this._interactionEvents.createBoxHit(gfx, 'click-stroke', {
38148 // add label hit
38191 * Add keyboard binding if respective editor action
38351 x: -speed,
38358 y: -speed
38781 if (direction.indexOf('n') !== -1) {
38783 } else if (direction.indexOf('s') !== -1) {
38787 if (direction.indexOf('e') !== -1) {
38789 } else if (direction.indexOf('w') !== -1) {
38797 var prefix = 'resize-';
38810 var MARKER_RESIZING$1 = 'djs-resizing',
38811 MARKER_RESIZE_NOT_OK = 'resize-not-ok';
38853 classes(frame).add(MARKER_RESIZE_NOT_OK);
38873 // add and update previews
38891 var HANDLE_OFFSET = -6,
38895 var CLS_RESIZER = 'djs-resizer';
38921 // add new selection markers ONLY if single selection
38962 classes(group).add(CLS_RESIZER);
38963 classes(group).add(CLS_RESIZER + '-' + element.id);
38964 classes(group).add(CLS_RESIZER + '-' + direction);
38971 x: -HANDLE_SIZE / 2 + offset.x,
38972 y: -HANDLE_SIZE / 2 + offset.y,
38977 classes(visual).add(CLS_RESIZER + '-visual');
38984 x: -HANDLE_HIT_SIZE / 2 + offset.x,
38985 y: -HANDLE_HIT_SIZE / 2 + offset.y,
38990 classes(hit).add(CLS_RESIZER + '-hit');
39010 * Add resizers for a given element.
39056 if (direction.indexOf('e') !== -1) {
39057 offset.x = -HANDLE_OFFSET;
39058 } else if (direction.indexOf('w') !== -1) {
39062 if (direction.indexOf('s') !== -1) {
39063 offset.y = -HANDLE_OFFSET;
39064 } else if (direction.indexOf('n') !== -1) {
39101 // add to correct place
39102 add(definitions.get('rootElements'), category);
39121 // listen to dblclick on non-root elements
39319 x: bbox.x - bbox.height / 2 + (15 * zoom),
39320 y: mid.y - (30 * zoom) / 2
39330 transform: 'rotate(-90deg)'
39383 x: mid.x - width / 2,
39384 y: bbox.y - paddingTop
39414 x: absoluteBBox.x - width / 2,
39415 y: absoluteBBox.y - height / 2
39517 var MARKER_HIDDEN = 'djs-element-hidden',
39518 MARKER_LABEL_HIDDEN = 'djs-label-hidden';
39722 // skip non-existing labels
39756 y: elementTrbl.top - ELEMENT_LABEL_DISTANCE - label.height / 2
39764 x: elementTrbl.left - ELEMENT_LABEL_DISTANCE - label.width / 2,
39821 // check whether there is a multi-orientation, e.g. 'top-left'
39822 if (hostOrientation.indexOf('-') >= 0) {
39823 freeAlignments = hostOrientation.split('-');
39830 return freeAlignments.indexOf(alignment) === -1;
39850 return c.waypoints[c.waypoints.length - 2 ];
39892 return takenAlignments.indexOf(alignment) === -1;
39896 if (freeAlignments.indexOf(labelOrientation) !== -1) {
39908 return ALIGNMENTS.indexOf(orientation) !== -1;
39927 y: source.y - (50) - shape.height / 2
40076 // remove after connecting to event-based gateway
40092 // remove after replacing connected gateway with event-based gateway
40137 * Add referenced root elements (error, escalation, message, signal) if they don't exist.
40211 // add root element
40212 add(rootElements, rootElement);
40363 'global-connect.hover',
40364 'global-connect.out',
40365 'global-connect.end',
40366 'global-connect.cleanup'
40467 * BPMN-specific behavior for creating participants.
40544 // re-use process when creating first participant
40568 // re-use process when creating first participant
40579 // re-use process when creating first participant
40613 // re-use process when creating first participant
40626 // re-use process when creating first participant
40669 x: -width / 2,
40670 y: -height / 2,
40680 bottom: childrenBBox.top + shape.height / 2 - VERTICAL_PARTICIPANT_PADDING,
40681 left: childrenBBox.right - shape.width / 2 + HORIZONTAL_PARTICIPANT_PADDING,
40682 top: childrenBBox.bottom - shape.height / 2 + VERTICAL_PARTICIPANT_PADDING,
40683 …right: childrenBBox.left + shape.width / 2 - HORIZONTAL_PARTICIPANT_PADDING - PARTICIPANT_BORDER_W…
40755 add(properties, targetRefProp);
40913 // disable auto-resize for data stores
40932 // disable auto-resize for data stores
41014 // update data store parents on collaboration -> process
41116 topAffected, 'y', offset, shape.y - 10);
41126 bottomAffected, 'y', -offset, shape.y + shape.height + 10);
41131 { x: 0, y: -offset }, 'n');
41249 return array.indexOf(item) !== -1;
41295 if (!isPointInsideBBox(shape, waypointsBefore[waypointsBefore.length-1])) {
41310 // reconnect source -> inserted shape
41320 // reconnect inserted shape -> end
41450 * Remove existing sequence flows of event-based target before connecting
41451 * from event-based gateway.
41477 * After replacing shape with event-based gateway, remove incoming sequence
41478 * flows of event-based targets which do not belong to event-based gateway
41642 * re-attach removed category
41656 add(category.get('categoryValue'), categoryValueRef);
41657 add(definitions.get('rootElements'), category);
41736 denominator = ((l2e.y - l2s.y) * (l1e.x - l1s.x)) - ((l2e.x - l2s.x) * (l1e.y - l1s.y));
41742 a = l1s.y - l2s.y;
41743 b = l1s.x - l2s.x;
41744 numerator = ((l2e.x - l2s.x) * a) - ((l2e.y - l2s.y) * b);
41751 x: Math.round(l1s.x + (c * (l1e.x - l1s.x))),
41752 y: Math.round(l1s.y + (c * (l1e.y - l1s.y)))
41767 y: elementMid.y - 50
41771 x: elementMid.x - 50,
41804 waypoints[waypoints.length - 1],
41805 waypoints[waypoints.length - 2],
41828 return Math.sqrt(Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2));
41881 // return value is between 0, 180 and -180, -0
41883 return Math.atan((line[1].y - line[0].y) / (line[1].x - line[0].x));
41896 x: Math.cos(angle) * vector.x - Math.sin(angle) * vector.y,
41915 { n: a[0] - c[0], lambda: b[0] },
41916 { n: a[1] - c[1], lambda: b[1] }
41923 return -n/l;
41939 var bd = { x: b.x - a.x, y: b.y - a.y };
41961 x: pfPoint.x - point.x,
41962 y: pfPoint.y - point.y
41979 x: point1.x - point2.x,
41980 y: point1.y - point2.y
42009 return sqrt(sq(p1.x - p2.x) + sq(p1.y - p2.y));
42053 for (idx = 0; idx < line.length - 1; idx++) {
42070 throw new Error('expected between [1, 2] circle -> line intersections');
42073 // one intersection -> bendpoint attachment
42083 // two intersections -> segment attachment
42119 var baX = s2.x - s1.x;
42120 var baY = s2.y - s1.y;
42121 var caX = cc.x - s1.x;
42122 var caY = cc.y - s1.y;
42126 var c = caX * caX + caY * caY - cr * cr;
42131 var disc = pBy2 * pBy2 - q;
42134 // negative, very close to zero results (-4e-15)
42136 if (disc < 0 && disc > -0.000001) {
42146 var abScalingFactor1 = -pBy2 + tmpSqrt;
42147 var abScalingFactor2 = -pBy2 - tmpSqrt;
42150 x: s1.x - baX * abScalingFactor1,
42151 y: s1.y - baY * abScalingFactor1
42159 x: s1.x - baX * abScalingFactor2,
42160 y: s1.y - baY * abScalingFactor2
42183 n >= min$1(rangeStart, rangeEnd) - EQUAL_THRESHOLD &&
42209 abs$3(p1.x - p2.x) <= EQUAL_THRESHOLD &&
42210 abs$3(p1.y - p2.y) <= EQUAL_THRESHOLD
42218 var offset = newWaypoints.length - oldWaypoints.length;
42254 newIndex = insert ? index + 1 : index - 1;
42263 if (insert && attachment.type !== 'bendpoint' && bendpointIndex-1 === index) {
42286 return (index === oldWaypoints.length - 2) ? newWaypoints.length - 2 : null;
42324 newLabelLineIndex > newWaypoints.length - 2) {
42338 var offset = newWaypoints.length - oldWaypoints.length,
42343 if (newWaypoints.indexOf(oldBendpoint) !== -1) {
42352 x: newBendpoint.x - attachment.position.x,
42353 y: newBendpoint.y - attachment.position.y
42358 if (offset < 0 && oldBendpointIndex !== 0 && oldBendpointIndex < oldWaypoints.length - 1) {
42364 x: (newLabelLine[1].x - newLabelLine[0].x) * relativeFootPosition + newLabelLine[0].x,
42365 y: (newLabelLine[1].y - newLabelLine[0].y) * relativeFootPosition + newLabelLine[0].y
42370 x: labelPosition.x - oldFoot.x,
42371 y: labelPosition.y - oldFoot.y
42375 x = newFoot.x + newLabelVector.x - labelPosition.x;
42376 y = newFoot.y + newLabelVector.y - labelPosition.y;
42389 var distanceSegment1 = getDistancePointPoint(waypoints[idx-1], waypoints[idx]),
42407 return a2 - a1;
42481 x: newShapeCenter.x + shapeDelta.x - shape.x,
42482 y: newShapeCenter.y + shapeDelta.y - shape.y
42502 y: newTRBL.bottom - oldTRBL.bottom
42507 y: newTRBL.top - oldTRBL.top
42511 x: newTRBL.left - oldTRBL.left,
42516 x: newTRBL.right - oldTRBL.right,
42521 // fallback to proportional movement for corner-placed attachments
42729 // Cf. https://github.com/bpmn-io/bpmn-js/pull/1227
42914 return waypointsInsideNewBounds[ waypointsInsideNewBounds.length - 1 ];
42925 oldAnchor = waypoints[waypoints.length - 1];
42950 oldAnchor = waypoints[ waypoints.length - 1 ];
42960 x: bounds.x - delta.x,
42961 y: bounds.y - delta.y,
43009 * BPMN-specific message flow behavior.
43088 tooltips.add({
43131 // behaviors plugged-in before)
43222 // monkey-patch selection saved in dragging in order to re-select it when operation is finished
43235 if (index === -1) {
43332 * BPMN-specific replace behavior.
43348 // replace elements on create, e.g. during copy-paste
43536 minTrbl.left = laneTrbl.right - LANE_MIN_DIMENSIONS.width;
43545 if (otherTrbl.top < (laneTrbl.top - 10)) {
43550 if (balanced && abs$2(laneTrbl.top - otherTrbl.bottom) < 10) {
43555 if (abs$2(laneTrbl.top - otherTrbl.top) < 5) {
43556 addMin(minTrbl, 'top', otherTrbl.bottom - LANE_MIN_DIMENSIONS.height);
43567 if (balanced && abs$2(laneTrbl.bottom - otherTrbl.top) < 10) {
43568 addMin(maxTrbl, 'bottom', otherTrbl.bottom - LANE_MIN_DIMENSIONS.height);
43572 if (abs$2(laneTrbl.bottom - otherTrbl.bottom) < 5) {
43588 addMin(minTrbl, 'top', flowElementTrbl.top - LANE_TOP_PADDING);
43600 addMin(minTrbl, 'left', flowElementTrbl.left - LANE_LEFT_PADDING);
43677 // only handle [a] -> [shape] -> [b] patterns
43720 getDocking$1(inWaypoints[inWaypoints.length - 2]),
43721 getDocking$1(inWaypoints[inWaypoints.length - 1]),
43727 inWaypoints.slice(0, inWaypoints.length - 1),
43733 getDocking$1(outWaypoints[outWaypoints.length - 1])
43818 return participant.height - resizedLane.height + LANE_MIN_DIMENSIONS.height;
43849 * Add start event replacing element with expanded sub process.
43927 newBounds.x = visibleBBox.x + (visibleBBox.width - newBounds.width) / 2;
43928 newBounds.y = visibleBBox.y + (visibleBBox.height - newBounds.height) / 2;
43932 newBounds.x = shape.x + (shape.width - newBounds.width) / 2;
43933 newBounds.y = shape.y + (shape.height - newBounds.height) / 2;
43942 x: shape.x + (shape.width - defaultSize.width) / 2,
43943 y: shape.y + (shape.height - defaultSize.height) / 2,
44138 'lane.add',
44220 this.counter--;
44349 var orientation = getOrientation(position, targetBounds, -15);
44720 return allParents.indexOf(possibleParent) !== -1;
44914 // only (re-)attach one element at a time
44992 // replace a non-interrupting start event by a blank interrupting start event
45150 // don't connect parent <-> child
45168 // https://github.com/bpmn-io/bpmn-js/issues/1033
45247 return (elements && element) && elements.indexOf(element) !== -1;
45475 { type: 'bpmn:Participant', order: { level: -2 } },
45476 { type: 'bpmn:Lane', order: { level: -1 } }
45532 index: -1
45560 // before being re-inserted
45561 if (insertIndex !== -1) {
45562 if (currentIndex !== -1 && currentIndex < insertIndex) {
45563 insertIndex -= 1;
45587 * A service that offers un- and redoable execution of commands.
45590 * in a un- and redoable manner. To do this it delegates the actual
45594 * {@link CommandHandler#revert(ctx)} methods to un- and redo a command
45598 * ## Life-Cycle events
45600 * In the process the command stack fires a number of life-cycle events
45638 * that may be re- and undone atomically.
45683 this._stackIdx = -1;
45786 this._stackIdx = -1;
46079 this._stackIdx--;
46109 '<div class="djs-tooltip-container" style="position: absolute; width: 0; height: 0;" />'
46127 var tooltipClass = 'djs-tooltip',
46140 * // add a pink badge on the top left of the shape
46141 * tooltips.add({
46150 * tooltips.add({
46152 * top: -5,
46153 * left: -5
46160 * var id = tooltips.add(...);
46182 * Mapping tooltipId -> tooltip
46225 * @param {number} [tooltip.timeout=-1]
46229 Tooltips.prototype.add = function(tooltip) {
46258 var tooltip = this.get(attr$1(node, 'data-tooltip-id'));
46358 …var matrix = 'matrix(' + a + ',0,0,' + d + ',' + (-1 * viewbox.x * a) + ',' + (-1 * viewbox.y * d)…
46361 this._tooltipRoot.style['-ms-transform'] = matrix;
46383 …htmlContainer = domify('<div data-tooltip-id="' + id + '" class="' + tooltipClass + '" style="posi…
46388 classes$1(htmlContainer).add('djs-tooltip-' + tooltip.type);
46392 classes$1(htmlContainer).add(tooltip.className);
46464 * This is a null-safe operation that ensures elements
46526 // add labels to visual's group
46538 if (!label.hidden && context.shapes.indexOf(label) === -1) {
46554 // add all labels to move closure
46563 // move closure yet and add them
46615 add(labelTarget.labels, shape, labelTargetIndex);
46647 return elements.indexOf(element.labelTarget) === -1;
46659 var MARKER_ATTACH$1 = 'attach-ok';
46665 * Optionally depends on `diagram-js/lib/features/move` to render
46668 * Optionally depends on `diagram-js/lib/features/label-support`
46685 // add all the attached shapes to the overall list of moved shapes
46697 // add attachers to the visual's group
46713 // add attach-ok marker to current host
46738 // add all attachers to move closure
46746 closure.add(attacher, closure.topLevel[attacher.host.id]);
46969 return array.indexOf(item) !== -1;
46983 * The tool manager acts as middle-man between the available tool's and the Palette,
47025 eventBus.fire('tool-manager.update', { tool: tool });
47050 // Todo[ricardo]: add test cases
47058 // We defer the de-activation of the tool to the .activate phase,
47087 return target && closest(target, '.group[data-group="tools"]');
47167 return array.indexOf(item) !== -1;
47199 height: height - dy
47212 width: width - dx,
47257 * Add or remove space by moving and resizing elements.
47407 start = event[ axis ] - delta;
47415 delta *= -1;
47418 // invert delta to add/remove space when removing/adding space if modifier key is pressed
47420 delta *= -1;
47451 set('resize-' + (axis === 'x' ? 'ew' : 'ns'));
47522 top: trbl.top - PADDING,
47525 left: trbl.left - PADDING
47542 event.dx = event.dx + x - event.x;
47549 event.dx = event.dx + x - event.x;
47556 event.dy = event.dy + y - event.y;
47563 event.dy = event.dy + y - event.y;
47603 minOrMax = start -
47621 minOrMax = start -
47641 resizingShape[ AXIS_TO_DIMENSION [ axis ] ] -
47647 resizingShape[ AXIS_TO_DIMENSION [ axis ] ] -
47652 minOrMax = start -
47658 minOrMax = start -
47671 return array.indexOf(item) !== -1;
47682 var MARKER_DRAGGING$1 = 'djs-dragging',
47683 MARKER_RESIZING = 'djs-resizing';
47710 // add crosshair
47716 x: 'M 0,-10000 L 0,10000',
47717 y: 'M -10000,0 L 10000,0'
47721 attr(crosshairGroup, styles.cls('djs-crosshair-group', [ 'no-events' ]));
47728 classes(pathX).add('djs-crosshair');
47735 classes(pathY).add('djs-crosshair');
47759 // add and update move/resize previews
47777 classes(line).add('djs-crosshair');
47784 attr(dragGroup, styles.cls('djs-drag-group', [ 'no-events' ]));
47846 attr(frameGroup, styles.cls('djs-frame-group', [ 'no-events' ]));
47870 x: 'M' + event.x + ', -10000 L' + event.x + ', 10000',
47871 y: 'M -10000, ' + event.y + ' L 10000, ' + event.y
47895 width = max(initialBounds.width - delta.x, 5);
47899 x: initialBounds.x + initialBounds.width - width
47908 height = max(initialBounds.height - delta.y, 5);
47912 y: initialBounds.y + initialBounds.height - height
48017 // bpmn:SequenceFlow -> SequenceFlow_ID
48180 * When morphing a Process into a Collaboration or vice-versa,
48317 // add condition to connection on revert reconnect to new source
48322 // add default to old source on revert reconnect to new source
48446 add(newRefs, businessObject);
48570 // unwrap Lane -> LaneSet -> (Lane | FlowElementsContainer)
48622 add(definitions.get('rootElements'), process);
48659 // add to new parent
48782 * A bpmn-aware factory for diagram-js shapes
49042 delta.x = alignment.left - element.x;
49045 delta.x = (alignment.right - element.width) - element.x;
49048 delta.x = (alignment.center - Math.round(element.width / 2)) - element.x;
49051 delta.y = alignment.top - element.y;
49054 delta.y = (alignment.bottom - element.height) - element.y;
49057 delta.y = (alignment.middle - Math.round(element.height / 2)) - element.y;
49180 // add connection
49234 x: round$3(waypoint.x - bbox.x - bbox.width / 2 + position.x),
49235 y: round$3(waypoint.y - bbox.y - bbox.height / 2 + position.y)
49241 x: round$3(element.x - bbox.x - bbox.width / 2 + position.x),
49242 y: round$3(element.y - bbox.y - bbox.height / 2 + position.y)
49274 if (parents.indexOf(element) === -1) {
49343 // (1) add at event center position _or_ at given bounds
49348 x: positionOrBounds.x - round$2(shape.width / 2),
49349 y: positionOrBounds.y - round$2(shape.height / 2)
49353 // (2) add to canvas
49485 add(parent.children, connection, parentIndex);
49538 * - Remove connections
49539 * - Remove all direct children
49602 add(oldParent.children, shape, oldParentIndex);
49644 return arr.length - 1;
49648 return range.max - range.min;
49654 delta[axis] = refCenter - center(element);
49678 if (idx && idx !== groups.length - 1) {
49716 if (idx && idx !== groups.length - 1) {
49721 spaceInBetween = Math.abs(lastGroup.range.min - firstGroup.range.max);
49723 margin = Math.round((spaceInBetween - groupsSize) / (groups.length - 1));
49725 if (margin < groups.length - 1) {
49737 prevGroup = groups[groupIdx - 1];
49743 delta[axis] = (prevGroup.range.max - element[axis]) + margin;
49746 delta[axis] += element[axis] - group.range.min;
49818 // add to new parent at position
49819 add(newParent.children, connection, newParentIndex);
49850 add(oldParent.children, connection, oldParentIndex);
49857 p.x -= delta.x;
49858 p.y -= delta.y;
49861 p.original.x -= delta.x;
49862 p.original.y -= delta.y;
49881 MoveClosure.prototype.add = function(element, isTopLevel) {
50041 // add to new parent at position
50042 add(newParent.children, shape, newParentIndex);
50090 add(oldParent.children, shape, oldParentIndex);
50095 x: shape.x - delta.x,
50096 y: shape.y - delta.y
50179 …|| getDocking(isArray$2(dockingOrPoints) ? dockingOrPoints[ dockingOrPoints.length - 1 ] : docking…
50237 * Add new shape.
50265 // (1) add new shape at given position
50460 * Add or remove space by moving and resizing shapes and updating connection waypoints.
50531 * 2. Only one of source and target is moved/resized => re-layout connection with moved start/end
50578 // re-layout connection with moved start/end
50642 return array.indexOf(item) !== -1;
50705 * Return a map { elementId -> hiddenState}.
50822 add(attachers, attacher, idx);
51433 * Use respective diagram-js provided handlers if you would
51669 add(bpmnDefinitions.rootElements, newRootBusinessObject);
51706 add(bpmnDefinitions.rootElements, oldRootBusinessObject);
51720 * A handler that allows us to add a new lane
51752 // (0) add a lane if we currently got none and are adding to root
51757 width: shape.width - LANE_INDENTATION,
51782 var offset = location === 'top' ? -120 : 120,
51784 spacePos = lanePosition + (location === 'top' ? 10 : -10),
51800 y: lanePosition - (location === 'top' ? 120 : 0),
51801 width: shape.width - (isRoot ? LANE_INDENTATION : 0),
51807 * A handler that splits a lane into a number of sub-lanes,
51857 if (idx === newLanesCount - 1) {
51858 laneHeight = shape.height - (newLanesHeight * idx);
51866 width: shape.width - LANE_INDENTATION,
51976 spacePos = shape.y + (trblDiff.bottom ? shape.height : 0) + (trblDiff.bottom ? -10 : 10);
51979 offset = trblDiff.top > 0 || trblDiff.bottom < 0 ? -change : change;
51990 spacePos = shape.x + (trblDiff.right ? shape.width : 0) + (trblDiff.right ? -10 : 100);
51993 offset = trblDiff.left > 0 || trblDiff.right < 0 ? -change : change;
52043 if (handledNodes.indexOf(flowNodeShape) === -1) {
52077 if (!root || handledNodes.indexOf(root) !== -1) {
52099 add = getNewLanes(flowNodeShape);
52101 updates.push({ flowNode: flowNode, remove: remove, add: add }); property
52108 // lane got removed XX-)
52111 updates.push({ flowNode: flowNode, remove: [ lane ], add: [] }); property
52140 update.add.forEach(function(newLane) {
52141 add(lanes, newLane);
52142 add(newLane.get(FLOW_NODE_REFS_ATTR), flowNode);
52161 update.add.forEach(function(newLane) {
52168 add(lanes, oldLane);
52169 add(oldLane.get(FLOW_NODE_REFS_ATTR), flowNode);
52256 'background-color': this._normalizeColor(colors.fill) });
52261 'border-color': this._normalizeColor(colors.stroke) });
52265 var assignedDi = isConnection$3(element) ? pick(di, [ 'border-color' ]) : di;
52283 * Cf. https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-fillstyle
52307 // (2) Return null for non-hex serialization result.
52308 return /^#[0-9a-fA-F]{6}$/.test(context.fillStyle) ? context.fillStyle : null;
52316 * Add legacy properties if required.
52317 * @param {{ 'border-color': string?, 'background-color': string? }} di
52320 if ('border-color' in di) {
52321 di.stroke = di['border-color'];
52324 if ('background-color' in di) {
52325 di.fill = di['background-color'];
52419 // resize element based on label _or_ pre-defined bounds
52484 handlers['lane.add'] = AddLaneHandler;
52551 this._commandStack.execute('lane.add', context);
52679 'h:v': -10,
52680 'v:h': -10
52710 var xmid = round$1((b.x - a.x) / 2 + a.x),
52711 ymid = round$1((b.y - a.y) / 2 + a.y);
52736 x: a.x + MIN_SEGMENT_LENGTH * (/l/.test(startDirection) ? -1 : 1),
52744 y: a.y + MIN_SEGMENT_LENGTH * (/t/.test(startDirection) ? -1 : 1)
52793 startSegment.waypoints[startSegment.waypoints.length - 1],
52813 var xmid = round$1((b.x - a.x) / 2 + a.x),
52814 ymid = round$1((b.y - a.y) / 2 + a.y);
52851 * [a]----[x]
52853 * [x]----[b]
52857 * [a]----[x]
52863 * [a]----[x]
52865 * [b]-[x]
52997 preferStraight = preferredLayouts.indexOf('straight') !== -1,
53000 // just layout non-existing or simple connections
53184 var q = points[idx - 1];
53211 for (i = points.length - 2; i !== 0; i--) {
53270 * getDirections('top'); // -> 'v:v'
53271 * getDirections('intersect'); // -> 't:t'
53273 * getDirections('top-right', 'v:h'); // -> 'v:h'
53274 * getDirections('top-right', 'h:h'); // -> 'h:h'
53301 // 'top-left'
53302 // 'top-right'
53303 // 'bottom-left'
53304 // 'bottom-right'
53324 'top-left': 'bottom-right',
53325 'bottom-right': 'top-left',
53326 'top-right': 'bottom-left',
53327 'bottom-left': 'top-right',
53371 * [x] ----- [x] ------ [x]
53373 * [x] ----- [x] - [x]
53377 * [x] ---------------- [x]
53379 * [x] ----------- [x]
53388 var previous = points[points.length - 1],
53399 var ATTACH_ORIENTATION_PADDING = -10,
53404 'top-right': 'bottom-left',
53405 'top-left': 'bottom-right',
53408 'bottom-right': 'top-left',
53409 'bottom-left': 'top-right',
53445 connectionEnd = getConnectionDocking(waypoints && waypoints[ waypoints.length - 1 ], target);
53455 return [].concat([ connectionStart ], waypoints.slice(1, -1), [ connectionEnd ]);
53464 // (1) outgoing of boundary events -> layout based on attach orientation and target orientation
53465 // (2) incoming/outgoing of gateways -> v:h for outgoing, h:v for incoming
53535 // (2) docking element connected to expanded sub-process has precedence
53586 return orientations.indexOf(orientation) !== -1;
53610 return b.indexOf(oppositeHorizontalOrientation) !== -1;
53618 return b.indexOf(oppositeVerticalOrientation) !== -1;
53702 return Math.abs(a[ axis ] - b[ axis ]) < threshold;
53712 // attached to either top-right, top-left, bottom-right or bottom-left corner
53762 // attached to either top-right, top-left, bottom-right or bottom-left corner
53828 dockingIdx = dockStart ? 0 : waypoints.length - 1;
53950 if (shapes.indexOf(shape) === -1) {
53955 // and add attachers for a proper dragger
54137 var MARKER_DRAGGING = 'djs-dragging',
54138 MARKER_OK$1 = 'drop-ok',
54139 MARKER_NOT_OK$1 = 'drop-not-ok',
54140 MARKER_NEW_PARENT = 'new-parent',
54141 MARKER_ATTACH = 'attach-ok';
54223 attr(dragGroup, styles.cls('djs-drag-group', [ 'no-events' ]));
54232 // add previews
54248 // add dragging marker
54381 var TOGGLE_SELECTOR = '.djs-palette-toggle',
54386 PALETTE_TWO_COLUMN_CLS = 'two-column';
54401 eventBus.on('tool-manager.update', function(event) {
54434 * 'entry-1': {
54583 var entriesContainer = query('.djs-palette-entries', this._container),
54592 var container = query('[data-group=' + grouping + ']', entriesContainer);
54594 container = domify('<div class="group" data-group="' + grouping + '"></div>');
54608 attr$1(control, 'data-action', id);
54646 entry = entries[attr$1(button, 'data-action')];
54733 entriesContainer = query('.djs-palette-entries', this._container);
54735 this._toolsContainer = query('[data-group=tools]', entriesContainer);
54741 var actionName = tool.getAttribute('data-action');
54749 actionName = actionName.replace('-tool', '');
54752 toolClasses.add('highlighted-entry');
54754 toolClasses.remove('highlighted-entry');
54790 '<div class="djs-palette">' +
54791 '<div class="djs-palette-entries"></div>' +
54792 '<div class="djs-palette-toggle"></div>' +
54804 classes.add(cls);
54855 class: 'djs-lasso-overlay',
55018 x: event.x - event.dx,
55019 y: event.y - event.dy
55035 width: end.x - start.x,
55036 height: end.y - start.y
55044 width: start.x - end.x,
55045 height: end.y - start.y
55053 width: end.x - start.x,
55054 height: start.y - end.y
55062 width: start.x - end.x,
55063 height: start.y - end.y
55249 var MARKER_OK = 'connect-ok',
55250 MARKER_NOT_OK = 'connect-not-ok';
55275 toolManager.registerTool('global-connect', {
55276 tool: 'global-connect',
55277 dragging: 'global-connect.drag'
55280 eventBus.on('global-connect.hover', function(event) {
55297 eventBus.on([ 'global-connect.out', 'global-connect.cleanup' ], function(event) {
55307 eventBus.on([ 'global-connect.ended' ], function(event) {
55323 eventBus.fire('global-connect.drag.ended');
55347 this._dragging.init(event, 'global-connect', {
55370 return context && /^global-connect/.test(context.prefix);
55489 'hand-tool': {
55491 className: 'bpmn-icon-hand-tool',
55499 'lasso-tool': {
55501 className: 'bpmn-icon-lasso-tool',
55509 'space-tool': {
55511 className: 'bpmn-icon-space-tool',
55519 'global-connect-tool': {
55521 className: 'bpmn-icon-connection-multi',
55529 'tool-separator': {
55533 'create.start-event': createAction(
55534 'bpmn:StartEvent', 'event', 'bpmn-icon-start-event-none',
55537 'create.intermediate-event': createAction(
55538 'bpmn:IntermediateThrowEvent', 'event', 'bpmn-icon-intermediate-event-none',
55541 'create.end-event': createAction(
55542 'bpmn:EndEvent', 'event', 'bpmn-icon-end-event-none',
55545 'create.exclusive-gateway': createAction(
55546 'bpmn:ExclusiveGateway', 'gateway', 'bpmn-icon-gateway-none',
55550 'bpmn:Task', 'activity', 'bpmn-icon-task',
55553 'create.data-object': createAction(
55554 'bpmn:DataObjectReference', 'data-object', 'bpmn-icon-data-object',
55557 'create.data-store': createAction(
55558 'bpmn:DataStoreReference', 'data-store', 'bpmn-icon-data-store',
55561 'create.subprocess-expanded': {
55563 className: 'bpmn-icon-subprocess-expanded',
55570 'create.participant-expanded': {
55572 className: 'bpmn-icon-participant',
55580 'bpmn:Group', 'artifact', 'bpmn-icon-group',
55643 var gfx = query('[data-element-id="' + cssEscape(element.id) + '"]', context.dragGroup);
55649 // clone the gfx of the temporary shape and add it to the drag group
55669 var originalGfx = query('[data-element-id="' + cssEscape(id) + '"]', context.dragGroup);
55802 // un-snap source
55820 } else if (event[ axis ] > target[ axis ] + dimensionForAxis - padding) {
55821 setSnapped(event, axis, target[ axis ] + dimensionForAxis - padding);
55848 orientation = getOrientation(sourceMid, target, -10),
55862 if (abs(coordinate - sourceMid[ axis ]) < BOUNDARY_TO_HOST_THRESHOLD) {
55867 newCoordinate = sourceMid[ axis ] - BOUNDARY_TO_HOST_THRESHOLD;
55904 && event[ axis ] < target[ axis ] + getDimensionForAxis(axis, target) - TARGET_CENTER_PADDING;
55961 if (this._snapLocations.indexOf(snapLocation) === -1) {
55980 * top-left, mid, bottom-right and so forth.
56029 * i.e. top-left, bottom-right, center to actual snap values.
56036 SnapPoints.prototype.add = function(snapLocation, point) {
56044 if (snapValues.x.indexOf(point.x) === -1) {
56048 if (snapValues.y.indexOf(point.y) === -1) {
56071 self.add(snapLocation, point);
56169 x: shapeMid.x - shape.width / 2,
56170 y: shapeMid.y - shape.height / 2
56178 x: shapeMid.x - event.x,
56179 y: shapeMid.y - event.y
56187 snapContext.setSnapOrigin('top-left', {
56188 x: shapeTopLeft.x - event.x,
56189 y: shapeTopLeft.y - event.y
56192 snapContext.setSnapOrigin('bottom-right', {
56193 x: shapeBottomRight.x - event.x,
56194 y: shapeBottomRight.y - event.y
56209 snapPoints.add('mid', mid$2(snapTarget));
56224 var waypoints = snapTarget.waypoints.slice(1, -1);
56227 snapPoints.add('mid', waypoint);
56234 snapPoints.add('mid', mid$2(snapTarget));
56243 snapPoints.add('mid', mid$2(shape));
56323 …snapContext.setSnapOrigin(connection.id + '-docking', getDockingSnapOrigin(docking, isMove, event)…
56327 var docking = connection.waypoints[connection.waypoints.length - 1];
56331 …snapContext.setSnapOrigin(connection.id + '-docking', getDockingSnapOrigin(docking, isMove, event)…
56337 snapContext.setSnapLocations([ 'top-left', 'bottom-right', 'mid' ]);
56355 snapPoints.add('top-left', topLeft(snapTarget));
56356 snapPoints.add('bottom-right', bottomRight(snapTarget));
56367 snapPoints.add('mid', getMid(connection.source));
56371 snapPoints.add(connection.id + '-docking', docking.original || docking);
56379 snapPoints.add('mid', getMid(connection.target));
56382 var docking = connection.waypoints[ connection.waypoints.length - 1 ];
56384 snapPoints.add(connection.id + '-docking', docking.original || docking);
56388 // add sequence flow parents as snap targets
56424 setSnapped(event, 'y', targetTRBL.top - offset.y);
56426 setSnapped(event, 'y', targetTRBL.bottom - offset.y);
56430 setSnapped(event, 'x', targetTRBL.left - offset.x);
56432 setSnapped(event, 'x', targetTRBL.right - offset.x);
56474 return array.indexOf(value) !== -1;
56480 x: docking.x - event.x,
56481 y: docking.y - event.y
56560 x: snapOrigin.x - event.x,
56561 y: snapOrigin.y - event.y
56571 snapPoints.add('corner', bottomRight(snapTarget));
56572 snapPoints.add('corner', topLeft(snapTarget));
56575 snapPoints.add('corner', getSnapOrigin(shape, direction));
56605 if (direction.indexOf('n') !== -1) {
56607 } else if (direction.indexOf('s') !== -1) {
56611 if (direction.indexOf('e') !== -1) {
56613 } else if (direction.indexOf('w') !== -1) {
56698 originValue: locationSnapping - snapOrigin[axis]
56731 classes(line).add('djs-snap-line');
56743 d: 'M-100000,' + position + ' L+100000,' + position,
56748 d: 'M ' + position + ',-100000 L ' + position + ', +100000',
57014 var bottomScroll = nodeOffset - this._resultsContainer.clientHeight + node.clientHeight;
57082 * SearchProvider.find - provides search function over own elements
57108 classes$1(this._container).add('open');
57178 classes$1(node).add(SearchPad.RESULT_SELECTED_CLASS);
57225 this._overlayId = this._overlays.add(element, overlay);
57249 bottom: h - offset,
57250 right: w - offset
57297 SearchPad.CONTAINER_SELECTOR = '.djs-search-container';
57298 SearchPad.INPUT_SELECTOR = '.djs-search-input input';
57299 SearchPad.RESULTS_CONTAINER_SELECTOR = '.djs-search-results';
57300 SearchPad.RESULT_SELECTOR = '.djs-search-result';
57301 SearchPad.RESULT_SELECTED_CLASS = 'djs-search-result-selected';
57303 SearchPad.RESULT_ID_ATTRIBUTE = 'data-result-id';
57304 SearchPad.RESULT_HIGHLIGHT_CLASS = 'djs-search-highlight';
57305 SearchPad.OVERLAY_CLASS = 'djs-search-overlay';
57308 '<div class="djs-search-container djs-draggable djs-scrollable">' +
57309 '<div class="djs-search-input">' +
57312 '<div class="djs-search-results"></div>' +
57316 '<div class="djs-search-result"></div>';
57319 '<div class="djs-search-result-primary"></div>';
57322 '<p class="djs-search-result-secondary"></p>';
57391 // exclude non-matched elements
57426 if (i > -1) {
57460 '<?xml version="1.0" encoding="UTF-8"?>' +
57461 '<bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ' +
57590 // non-modeling components
57629 // - viewer modules
57630 // - interaction modules
57631 // - modeling modules