chore(project): migrate to new SECTION comments

This commit is contained in:
Nico Rehwaldt 2018-02-27 09:57:22 +01:00
parent dce2425c5c
commit 19e4e19bb5
23 changed files with 43 additions and 36 deletions

View File

@ -6,7 +6,7 @@ var every = require('lodash/collection/every'),
var componentsToPath = require('diagram-js/lib/util/RenderUtil').componentsToPath; var componentsToPath = require('diagram-js/lib/util/RenderUtil').componentsToPath;
///////// element utils ///////////////////////////// // element utils //////////////////////
/** /**
* Checks if eventDefinition of the given element matches with semantic type. * Checks if eventDefinition of the given element matches with semantic type.
@ -59,7 +59,7 @@ function getSemantic(element) {
module.exports.getSemantic = getSemantic; module.exports.getSemantic = getSemantic;
/////// color access //////////////////////////////////////// // color access //////////////////////
function getFillColor(element, defaultColor) { function getFillColor(element, defaultColor) {
return getDi(element).get('bioc:fill') || defaultColor || 'white'; return getDi(element).get('bioc:fill') || defaultColor || 'white';
@ -74,7 +74,7 @@ function getStrokeColor(element, defaultColor) {
module.exports.getStrokeColor = getStrokeColor; module.exports.getStrokeColor = getStrokeColor;
/////// cropping path customizations ///////////////////////// // cropping path customizations //////////////////////
function getCirclePath(shape) { function getCirclePath(shape) {

View File

@ -449,7 +449,7 @@ function PathMap() {
module.exports = PathMap; module.exports = PathMap;
////////// helpers ////////// // helpers //////////////////////
// copied from https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js // copied from https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js
var tokenRegex = /\{([^}]+)\}/g, var tokenRegex = /\{([^}]+)\}/g,

View File

@ -62,7 +62,7 @@ AutoPlace.$inject = [
module.exports = AutoPlace; module.exports = AutoPlace;
/////////// helpers ///////////////////////////////////// // helpers //////////////////////
/** /**
* Find the new position for the target element to * Find the new position for the target element to

View File

@ -377,7 +377,7 @@ module.exports.deconflictPosition = deconflictPosition;
///////// helpers ///////////////////// // helpers //////////////////////
function noneFilter() { function noneFilter() {
return true; return true;

View File

@ -333,7 +333,7 @@ LabelEditingProvider.prototype.update = function(
////////// helpers //////////////////////////////// // helpers //////////////////////
function isCollapsedSubProcess(element) { function isCollapsedSubProcess(element) {
return is(element, 'bpmn:SubProcess') && !isExpanded(element); return is(element, 'bpmn:SubProcess') && !isExpanded(element);

View File

@ -27,7 +27,7 @@ function BpmnUpdater(eventBus, bpmnFactory, connectionDocking, translate) {
////// connection cropping ///////////////////////// // connection cropping //////////////////////
// crop connection ends during create/update // crop connection ends during create/update
function cropConnection(e) { function cropConnection(e) {
@ -54,7 +54,7 @@ function BpmnUpdater(eventBus, bpmnFactory, connectionDocking, translate) {
////// BPMN + DI update ///////////////////////// // BPMN + DI update //////////////////////
// update parent // update parent
@ -290,7 +290,7 @@ module.exports = BpmnUpdater;
BpmnUpdater.$inject = [ 'eventBus', 'bpmnFactory', 'connectionDocking', 'translate' ]; BpmnUpdater.$inject = [ 'eventBus', 'bpmnFactory', 'connectionDocking', 'translate' ];
/////// implementation ////////////////////////////////// // implementation //////////////////////
BpmnUpdater.prototype.updateAttachment = function(context) { BpmnUpdater.prototype.updateAttachment = function(context) {
@ -660,7 +660,7 @@ BpmnUpdater.prototype.updateConnection = function(context) {
}; };
/////// helpers ///////////////////////////////////////// // helpers //////////////////////
BpmnUpdater.prototype._getLabel = function(di) { BpmnUpdater.prototype._getLabel = function(di) {
if (!di.label) { if (!di.label) {

View File

@ -189,7 +189,7 @@ ElementFactory.prototype.createParticipantShape = function(collapsed) {
}; };
//////////// helpers //////////////////////////////////// // helpers //////////////////////
/** /**
* Apply attributes from a map to the given element, * Apply attributes from a map to the given element,

View File

@ -74,7 +74,7 @@ ImportDockingFix.$inject = [ 'eventBus' ];
module.exports = ImportDockingFix; module.exports = ImportDockingFix;
/////// helpers ////////////////////////////////// // helpers //////////////////////
function getDistance(p1, p2) { function getDistance(p1, p2) {
return Math.sqrt(Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2)); return Math.sqrt(Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2));

View File

@ -45,7 +45,7 @@ RemoveElementBehavior.$inject = [ 'eventBus', 'bpmnRules', 'modeling' ];
module.exports = RemoveElementBehavior; module.exports = RemoveElementBehavior;
///////// helpers ////////////////////////////// // helpers //////////////////////
function getDocking(point) { function getDocking(point) {
return point.original || point; return point.original || point;

View File

@ -130,7 +130,7 @@ module.exports = ToggleElementCollapseBehaviour;
/////// helpers /////////////////////////// // helpers //////////////////////
function filterVisible(elements) { function filterVisible(elements) {
return elements.filter(function(e) { return elements.filter(function(e) {

View File

@ -40,7 +40,7 @@ DeleteSequenceFlowBehavior.$inject = [ 'eventBus', 'modeling' ];
module.exports = DeleteSequenceFlowBehavior; module.exports = DeleteSequenceFlowBehavior;
/////// helpers /////////////////////////// // helpers //////////////////////
function isDefaultFlow(connection, source) { function isDefaultFlow(connection, source) {

View File

@ -184,7 +184,7 @@ function getLabelAdjustment(label, newWaypoints, oldWaypoints, hints) {
module.exports.getLabelAdjustment = getLabelAdjustment; module.exports.getLabelAdjustment = getLabelAdjustment;
//// HELPERS /////// // HELPERS //////////////////////
function relativePositionMidWaypoint(waypoints, idx) { function relativePositionMidWaypoint(waypoints, idx) {
@ -194,7 +194,6 @@ function relativePositionMidWaypoint(waypoints, idx) {
var relativePosition = distanceSegment1 / ( distanceSegment1 + distanceSegment2 ); var relativePosition = distanceSegment1 / ( distanceSegment1 + distanceSegment2 );
return relativePosition; return relativePosition;
} }
function getLabelMid(label) { function getLabelMid(label) {

View File

@ -42,7 +42,7 @@ UpdatePropertiesHandler.$inject = [ 'elementRegistry', 'moddle', 'translate', 'm
module.exports = UpdatePropertiesHandler; module.exports = UpdatePropertiesHandler;
////// api ///////////////////////////////////////////// // api //////////////////////
/** /**
* Updates a BPMN element with a list of new properties * Updates a BPMN element with a list of new properties

View File

@ -181,7 +181,11 @@ function BpmnSnapping(eventBus, canvas, bpmnRules, elementRegistry) {
} }
if (is(shape, 'bpmn:Lane') || is(shape, 'bpmn:Participant')) { if (is(shape, 'bpmn:Lane') || is(shape, 'bpmn:Participant')) {
context.resizeConstraints = getParticipantSizeConstraints(shape, context.direction, context.balanced); context.resizeConstraints = getParticipantSizeConstraints(
shape,
context.direction,
context.balanced
);
} }
if (is(shape, 'bpmn:TextAnnotation')) { if (is(shape, 'bpmn:TextAnnotation')) {
@ -193,7 +197,12 @@ function BpmnSnapping(eventBus, canvas, bpmnRules, elementRegistry) {
inherits(BpmnSnapping, Snapping); inherits(BpmnSnapping, Snapping);
BpmnSnapping.$inject = [ 'eventBus', 'canvas', 'bpmnRules', 'elementRegistry' ]; BpmnSnapping.$inject = [
'eventBus',
'canvas',
'bpmnRules',
'elementRegistry'
];
module.exports = BpmnSnapping; module.exports = BpmnSnapping;
@ -347,7 +356,7 @@ BpmnSnapping.prototype.addTargetSnaps = function(snapPoints, shape, target) {
}; };
/////// participant snapping ////////////////// // participant snapping //////////////////////
function initParticipantSnapping(context, shape, elements) { function initParticipantSnapping(context, shape, elements) {
@ -406,8 +415,7 @@ function snapParticipant(snapBox, shape, event, offset) {
} }
/////// boundary event snapping ///////////////////////// // boundary event snapping //////////////////////
function snapBoundaryEvent(event, shape, target) { function snapBoundaryEvent(event, shape, target) {
var targetTRBL = asTRBL(target); var targetTRBL = asTRBL(target);

View File

@ -18,7 +18,7 @@ module.exports.getBoundaryAttachment = getBoundaryAttachment;
// participant snapping box implementation ///////////////// // participant snapping box implementation //////////////////////
var is = require('../../util/ModelUtil').is; var is = require('../../util/ModelUtil').is;

View File

@ -43,7 +43,7 @@ function BpmnTreeWalker(handler, translate) {
// prerequisites are drawn // prerequisites are drawn
var deferred = []; var deferred = [];
///// Helpers ///////////////////////////////// // Helpers //////////////////////
function contextual(fn, ctx) { function contextual(fn, ctx) {
return function(e) { return function(e) {
@ -98,7 +98,7 @@ function BpmnTreeWalker(handler, translate) {
handler.error(message, context); handler.error(message, context);
} }
////// DI handling //////////////////////////// // DI handling //////////////////////
function registerDi(di) { function registerDi(di) {
var bpmnElement = di.bpmnElement; var bpmnElement = di.bpmnElement;
@ -140,7 +140,7 @@ function BpmnTreeWalker(handler, translate) {
} }
////// Semantic handling ////////////////////// // Semantic handling //////////////////////
/** /**
* Handle definitions and return the rendered diagram (if any) * Handle definitions and return the rendered diagram (if any)
@ -448,7 +448,7 @@ function BpmnTreeWalker(handler, translate) {
}); });
} }
///// API //////////////////////////////// // API //////////////////////
return { return {
handleDefinitions: handleDefinitions handleDefinitions: handleDefinitions

View File

@ -231,7 +231,7 @@ describe('features/auto-place', function() {
////////// helpers ///////////////////////////////////////// // helpers //////////////////////
function autoPlace(cfg) { function autoPlace(cfg) {

View File

@ -661,7 +661,7 @@ describe('features/copy-paste', function() {
////// test helpers ////////////////////////////////////////////////// // test helpers //////////////////////
function integrationTest(ids) { function integrationTest(ids) {

View File

@ -110,7 +110,7 @@ describe('features/modeling - move elements', function() {
}); });
///////// helpers ///////////////////////////////// // helpers //////////////////////
function moveWaypoint(p, delta) { function moveWaypoint(p, delta) {
return { return {

View File

@ -241,7 +241,7 @@ describe('features/modeling - remove element behavior', function() {
////////////////////////// helper ///////////////////////////////// // helper //////////////////////
function point(p) { function point(p) {
return { return {

View File

@ -620,7 +620,7 @@ describe('features/modeling - collapse and expand elements', function() {
}); });
/////////// helpers ///////////////////////////// // helpers //////////////////////
function allHidden() { function allHidden() {

View File

@ -114,7 +114,7 @@ describe('features/modeling - layout connection', function() {
///////// helpers /////////////////////////// // helpers //////////////////////
function toPoint(p) { function toPoint(p) {
return { return {

View File

@ -464,7 +464,7 @@ describe('import - Importer', function() {
////////// helpers ///////////////////////////////////// // helpers //////////////////////
function expectChildren(diagram, parent, children) { function expectChildren(diagram, parent, children) {