mirror of
https://github.com/sartography/bpmn-js.git
synced 2025-01-23 15:29:05 +00:00
7478388070
This increase the safety of our build; external consumers do no longer need to account for the `browser` field to bundle bpmn-js (or otherwise bundle a Node shim, unintentionally).
42 lines
1.0 KiB
JavaScript
42 lines
1.0 KiB
JavaScript
import CroppingConnectionDocking from 'diagram-js/lib/layout/CroppingConnectionDocking';
|
|
|
|
import {
|
|
getOrientation
|
|
} from 'diagram-js/lib/layout/LayoutUtil';
|
|
|
|
import inherits from 'inherits-browser';
|
|
|
|
|
|
export default function LoggingCroppingConnectionDocking(injector) {
|
|
injector.invoke(CroppingConnectionDocking, this);
|
|
}
|
|
|
|
LoggingCroppingConnectionDocking.$inject = [
|
|
'injector'
|
|
];
|
|
|
|
inherits(LoggingCroppingConnectionDocking, CroppingConnectionDocking);
|
|
|
|
window.noIntersectCount = 0;
|
|
|
|
window.noIntersect = [];
|
|
|
|
LoggingCroppingConnectionDocking.prototype._getIntersection = function(shape, connection, takeFirst) {
|
|
|
|
var intersection = CroppingConnectionDocking.prototype._getIntersection.call(this, shape, connection, takeFirst);
|
|
|
|
if (!intersection) {
|
|
|
|
if (getOrientation(connection.source, connection.target) !== 'intersect') {
|
|
window.noIntersectCount++;
|
|
|
|
window.noIntersect.push([
|
|
connection,
|
|
this._getShapePath(shape),
|
|
this._getConnectionPath(connection)
|
|
]);
|
|
}
|
|
}
|
|
|
|
return intersection;
|
|
}; |