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;
///////// element utils /////////////////////////////
// element utils //////////////////////
/**
* Checks if eventDefinition of the given element matches with semantic type.
@ -59,7 +59,7 @@ function getSemantic(element) {
module.exports.getSemantic = getSemantic;
/////// color access ////////////////////////////////////////
// color access //////////////////////
function getFillColor(element, defaultColor) {
return getDi(element).get('bioc:fill') || defaultColor || 'white';
@ -74,7 +74,7 @@ function getStrokeColor(element, defaultColor) {
module.exports.getStrokeColor = getStrokeColor;
/////// cropping path customizations /////////////////////////
// cropping path customizations //////////////////////
function getCirclePath(shape) {

View File

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

View File

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

View File

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

View File

@ -333,7 +333,7 @@ LabelEditingProvider.prototype.update = function(
////////// helpers ////////////////////////////////
// helpers //////////////////////
function isCollapsedSubProcess(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
function cropConnection(e) {
@ -54,7 +54,7 @@ function BpmnUpdater(eventBus, bpmnFactory, connectionDocking, translate) {
////// BPMN + DI update /////////////////////////
// BPMN + DI update //////////////////////
// update parent
@ -290,7 +290,7 @@ module.exports = BpmnUpdater;
BpmnUpdater.$inject = [ 'eventBus', 'bpmnFactory', 'connectionDocking', 'translate' ];
/////// implementation //////////////////////////////////
// implementation //////////////////////
BpmnUpdater.prototype.updateAttachment = function(context) {
@ -660,7 +660,7 @@ BpmnUpdater.prototype.updateConnection = function(context) {
};
/////// helpers /////////////////////////////////////////
// helpers //////////////////////
BpmnUpdater.prototype._getLabel = function(di) {
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,

View File

@ -74,7 +74,7 @@ ImportDockingFix.$inject = [ 'eventBus' ];
module.exports = ImportDockingFix;
/////// helpers //////////////////////////////////
// helpers //////////////////////
function getDistance(p1, p2) {
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;
///////// helpers //////////////////////////////
// helpers //////////////////////
function getDocking(point) {
return point.original || point;

View File

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

View File

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

View File

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

View File

@ -42,7 +42,7 @@ UpdatePropertiesHandler.$inject = [ 'elementRegistry', 'moddle', 'translate', 'm
module.exports = UpdatePropertiesHandler;
////// api /////////////////////////////////////////////
// api //////////////////////
/**
* 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')) {
context.resizeConstraints = getParticipantSizeConstraints(shape, context.direction, context.balanced);
context.resizeConstraints = getParticipantSizeConstraints(
shape,
context.direction,
context.balanced
);
}
if (is(shape, 'bpmn:TextAnnotation')) {
@ -193,7 +197,12 @@ function BpmnSnapping(eventBus, canvas, bpmnRules, elementRegistry) {
inherits(BpmnSnapping, Snapping);
BpmnSnapping.$inject = [ 'eventBus', 'canvas', 'bpmnRules', 'elementRegistry' ];
BpmnSnapping.$inject = [
'eventBus',
'canvas',
'bpmnRules',
'elementRegistry'
];
module.exports = BpmnSnapping;
@ -347,7 +356,7 @@ BpmnSnapping.prototype.addTargetSnaps = function(snapPoints, shape, target) {
};
/////// participant snapping //////////////////
// participant snapping //////////////////////
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) {
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;

View File

@ -43,7 +43,7 @@ function BpmnTreeWalker(handler, translate) {
// prerequisites are drawn
var deferred = [];
///// Helpers /////////////////////////////////
// Helpers //////////////////////
function contextual(fn, ctx) {
return function(e) {
@ -98,7 +98,7 @@ function BpmnTreeWalker(handler, translate) {
handler.error(message, context);
}
////// DI handling ////////////////////////////
// DI handling //////////////////////
function registerDi(di) {
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)
@ -448,7 +448,7 @@ function BpmnTreeWalker(handler, translate) {
});
}
///// API ////////////////////////////////
// API //////////////////////
return {
handleDefinitions: handleDefinitions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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