chore(project): update to new lint style

This commit is contained in:
Nico Rehwaldt 2018-02-27 10:08:31 +01:00
parent 19e4e19bb5
commit b03014fc2c
28 changed files with 264 additions and 82 deletions

View File

@ -123,7 +123,7 @@ function BpmnRenderer(eventBus, styles, pathMap, canvas, priority) {
createMarker(type, fill, stroke);
}
return 'url(#' + id + ')';
return 'url(#' + id + ')';
}
function createMarker(type, fill, stroke) {

View File

@ -416,7 +416,7 @@ function PathMap() {
my = param.containerHeight * param.position.my;
}
var coordinates = {}; //map for the scaled coordinates
var coordinates = {}; // map for the scaled coordinates
if (param.position) {
// path
@ -424,18 +424,18 @@ function PathMap() {
var widthRatio = (param.containerWidth / rawPath.width) * param.xScaleFactor;
//Apply height ratio
// Apply height ratio
for (var heightIndex = 0; heightIndex < rawPath.heightElements.length; heightIndex++) {
coordinates['y' + heightIndex] = rawPath.heightElements[heightIndex] * heightRatio;
}
//Apply width ratio
// Apply width ratio
for (var widthIndex = 0; widthIndex < rawPath.widthElements.length; widthIndex++) {
coordinates['x' + widthIndex] = rawPath.widthElements[widthIndex] * widthRatio;
}
}
//Apply value to raw path
// Apply value to raw path
var path = format(
rawPath.d, {
mx: mx,

View File

@ -31,7 +31,7 @@ function ContextPadProvider(
this._connect = connect;
this._create = create;
this._popupMenu = popupMenu;
this._canvas = canvas;
this._canvas = canvas;
this._rules = rules;
this._translate = translate;
@ -338,7 +338,7 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) {
'bpmn:InteractionNode',
'bpmn:DataObjectReference',
'bpmn:DataStoreReference'
]) ) {
])) {
assign(actions, {
'append.text-annotation': appendAction('bpmn:TextAnnotation', 'bpmn-icon-text-annotation'),

View File

@ -227,7 +227,7 @@ function BpmnUpdater(eventBus, bpmnFactory, connectionDocking, translate) {
!(is(newTarget, 'bpmn:Activity') ||
is(newTarget, 'bpmn:EndEvent') ||
is(newTarget, 'bpmn:Gateway') ||
is(newTarget, 'bpmn:IntermediateThrowEvent')) ) {
is(newTarget, 'bpmn:IntermediateThrowEvent'))) {
context.default = businessObject.sourceRef.default;
businessObject.sourceRef.default = undefined;
}
@ -235,7 +235,7 @@ function BpmnUpdater(eventBus, bpmnFactory, connectionDocking, translate) {
// on reconnectStart -> conditional flow
if (oldSource && (businessObject.conditionExpression) &&
!(is(newSource, 'bpmn:Activity') ||
is(newSource, 'bpmn:Gateway')) ) {
is(newSource, 'bpmn:Gateway'))) {
context.conditionExpression = businessObject.conditionExpression;
businessObject.conditionExpression = undefined;
}
@ -245,7 +245,7 @@ function BpmnUpdater(eventBus, bpmnFactory, connectionDocking, translate) {
!(is(newTarget, 'bpmn:Activity') ||
is(newTarget, 'bpmn:EndEvent') ||
is(newTarget, 'bpmn:Gateway') ||
is(newTarget, 'bpmn:IntermediateThrowEvent')) ) {
is(newTarget, 'bpmn:IntermediateThrowEvent'))) {
context.conditionExpression = businessObject.conditionExpression;
businessObject.conditionExpression = undefined;
}

View File

@ -39,7 +39,7 @@ function LabelSupport(eventBus, modeling, bpmnFactory) {
var textUtil = new TextUtil();
///// create external labels on shape creation
// create external labels on shape creation
this.postExecute([ 'shape.create', 'connection.create' ], function(e) {
var context = e.context;
@ -70,7 +70,7 @@ function LabelSupport(eventBus, modeling, bpmnFactory) {
});
///// update di information on label creation
// update di information on label creation
this.executed([ 'label.create' ], function(event) {
@ -107,7 +107,7 @@ function LabelSupport(eventBus, modeling, bpmnFactory) {
});
///// update label position on connection change
// update label position on connection change
function getHiddenLabelAdjustment(event) {
@ -169,7 +169,7 @@ function LabelSupport(eventBus, modeling, bpmnFactory) {
});
////// keep label position on shape replace
// keep label position on shape replace
this.postExecute([ 'shape.replace' ], function(event) {
var context = event.context,

View File

@ -65,7 +65,7 @@ function ReplaceElementBehaviour(eventBus, bpmnReplace, bpmnRules, elementRegist
}, this);
this.postExecuted( [ 'shape.replace' ], 1500, function(e) {
this.postExecuted([ 'shape.replace' ], 1500, function(e) {
var context = e.context,
oldShape = context.oldShape,
newShape = context.newShape;

View File

@ -7,7 +7,7 @@
* @return {Float}
*/
function vectorLength(v) {
return Math.sqrt( Math.pow(v.x, 2) + Math.pow(v.y, 2) );
return Math.sqrt(Math.pow(v.x, 2) + Math.pow(v.y, 2));
}
module.exports.vectorLength = vectorLength;
@ -21,7 +21,7 @@ module.exports.vectorLength = vectorLength;
function getAngle(line) {
// return value is between 0, 180 and -180, -0
// @janstuemmel: maybe replace return a/b with b/a
return Math.atan( (line[1].y - line[0].y) / (line[1].x - line[0].x) );
return Math.atan((line[1].y - line[0].y) / (line[1].x - line[0].x));
}
module.exports.getAngle = getAngle;
@ -81,7 +81,7 @@ function perpendicularFoot(point, line) {
var bd = { x: b.x - a.x, y: b.y - a.y };
// solve equation system to the parametrized vectors param real value
var r = solveLambaSystem( [ a.x, a.y ], [ bd.x, bd.y ], [ point.x, point.y ] );
var r = solveLambaSystem([ a.x, a.y ], [ bd.x, bd.y ], [ point.x, point.y ]);
return { x: a.x + r*bd.x, y: a.y + r*bd.y };

View File

@ -191,7 +191,7 @@ function relativePositionMidWaypoint(waypoints, idx) {
var distanceSegment1 = getDistancePointPoint(waypoints[idx-1], waypoints[idx]),
distanceSegment2 = getDistancePointPoint(waypoints[idx], waypoints[idx+1]);
var relativePosition = distanceSegment1 / ( distanceSegment1 + distanceSegment2 );
var relativePosition = distanceSegment1 / (distanceSegment1 + distanceSegment2);
return relativePosition;
}

View File

@ -38,7 +38,7 @@ PaletteProvider.$inject = [
PaletteProvider.prototype.getPaletteEntries = function(element) {
var actions = {},
var actions = {},
create = this._create,
elementFactory = this._elementFactory,
spaceTool = this._spaceTool,

View File

@ -197,7 +197,7 @@ ReplaceMenuProvider.prototype.getEntries = function(element) {
var isTargetExpanded = target.isExpanded === true;
return isDifferentType(element, target) && ( !isTargetSubProcess || isTargetExpanded );
return isDifferentType(element, target) && (!isTargetSubProcess || isTargetExpanded);
});
return this._createEntries(element, entries);

View File

@ -66,7 +66,7 @@ function getParticipantSizeConstraints(laneShape, resizeDirection, balanced) {
var isFirst = true,
isLast = true;
///// max top/bottom size for lanes
// max top/bottom size for lanes
var allLanes = collectLanes(lanesRoot, [ lanesRoot ]);
@ -122,7 +122,7 @@ function getParticipantSizeConstraints(laneShape, resizeDirection, balanced) {
});
///// max top/bottom/left/right size based on flow nodes
// max top/bottom/left/right size based on flow nodes
var flowElements = lanesRoot.children.filter(function(s) {
return !s.hidden && !s.waypoints && (is(s, 'bpmn:FlowElement') || is(s, 'bpmn:Artifact'));

View File

@ -109,7 +109,7 @@ function BpmnTreeWalker(handler, translate) {
translate('multiple DI elements defined for {element}', {
element: elementToString(bpmnElement)
}),
{ element: bpmnElement }
{ element: bpmnElement }
);
} else {
diRefs.bind(bpmnElement, 'di');

View File

@ -45,12 +45,12 @@ function getFlowLabelPosition(waypoints) {
var position = getWaypointsMid(waypoints);
// calculate angle
var angle = Math.atan( (second.y - first.y) / (second.x - first.x) );
var angle = Math.atan((second.y - first.y) / (second.x - first.x));
var x = position.x,
y = position.y;
if ( Math.abs(angle) < Math.PI / 2 ) {
if (Math.abs(angle) < Math.PI / 2) {
y -= FLOW_LABEL_INDENT;
} else {
x += FLOW_LABEL_INDENT;

188
package-lock.json generated
View File

@ -4,6 +4,140 @@
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@babel/code-frame": {
"version": "7.0.0-beta.40",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.40.tgz",
"integrity": "sha512-eVXQSbu/RimU6OKcK2/gDJVTFcxXJI4sHbIqw2mhwMZeQ2as/8AhS9DGkEDoHMBBNJZ5B0US63lF56x+KDcxiA==",
"dev": true,
"requires": {
"@babel/highlight": "7.0.0-beta.40"
}
},
"@babel/generator": {
"version": "7.0.0-beta.40",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.0.0-beta.40.tgz",
"integrity": "sha512-c91BQcXyTq/5aFV4afgOionxZS1dxWt8OghEx5Q52SKssdGRFSiMKnk9tGkev1pYULPJBqjSDZU2Pcuc58ffZw==",
"dev": true,
"requires": {
"@babel/types": "7.0.0-beta.40",
"jsesc": "2.5.1",
"lodash": "4.17.5",
"source-map": "0.5.7",
"trim-right": "1.0.1"
},
"dependencies": {
"lodash": {
"version": "4.17.5",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz",
"integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==",
"dev": true
}
}
},
"@babel/helper-function-name": {
"version": "7.0.0-beta.40",
"resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.40.tgz",
"integrity": "sha512-cK9BVLtOfisSISTTHXKGvBc2OBh65tjEk4PgXhsSnnH0i8RP2v+5RCxoSlh2y/i+l2fxQqKqv++Qo5RMiwmRCA==",
"dev": true,
"requires": {
"@babel/helper-get-function-arity": "7.0.0-beta.40",
"@babel/template": "7.0.0-beta.40",
"@babel/types": "7.0.0-beta.40"
}
},
"@babel/helper-get-function-arity": {
"version": "7.0.0-beta.40",
"resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.40.tgz",
"integrity": "sha512-MwquaPznI4cUoZEgHC/XGkddOXtqKqD4DvZDOyJK2LR9Qi6TbMbAhc6IaFoRX7CRTFCmtGeu8gdXW2dBotBBTA==",
"dev": true,
"requires": {
"@babel/types": "7.0.0-beta.40"
}
},
"@babel/highlight": {
"version": "7.0.0-beta.40",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.40.tgz",
"integrity": "sha512-mOhhTrzieV6VO7odgzFGFapiwRK0ei8RZRhfzHhb6cpX3QM8XXuCLXWjN8qBB7JReDdUR80V3LFfFrGUYevhNg==",
"dev": true,
"requires": {
"chalk": "2.3.0",
"esutils": "2.0.2",
"js-tokens": "3.0.2"
}
},
"@babel/template": {
"version": "7.0.0-beta.40",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.0.0-beta.40.tgz",
"integrity": "sha512-RlQiVB7eL7fxsKN6JvnCCwEwEL28CBYalXSgWWULuFlEHjtMoXBqQanSie3bNyhrANJx67sb+Sd/vuGivoMwLQ==",
"dev": true,
"requires": {
"@babel/code-frame": "7.0.0-beta.40",
"@babel/types": "7.0.0-beta.40",
"babylon": "7.0.0-beta.40",
"lodash": "4.17.5"
},
"dependencies": {
"lodash": {
"version": "4.17.5",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz",
"integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==",
"dev": true
}
}
},
"@babel/traverse": {
"version": "7.0.0-beta.40",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.0.0-beta.40.tgz",
"integrity": "sha512-h96SQorjvdSuxQ6hHFIuAa3oxnad1TA5bU1Zz88+XqzwmM5QM0/k2D+heXGGy/76gT5ajl7xYLKGiPA/KTyVhQ==",
"dev": true,
"requires": {
"@babel/code-frame": "7.0.0-beta.40",
"@babel/generator": "7.0.0-beta.40",
"@babel/helper-function-name": "7.0.0-beta.40",
"@babel/types": "7.0.0-beta.40",
"babylon": "7.0.0-beta.40",
"debug": "3.1.0",
"globals": "11.2.0",
"invariant": "2.2.3",
"lodash": "4.17.5"
},
"dependencies": {
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"dev": true,
"requires": {
"ms": "2.0.0"
}
},
"lodash": {
"version": "4.17.5",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz",
"integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==",
"dev": true
}
}
},
"@babel/types": {
"version": "7.0.0-beta.40",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.40.tgz",
"integrity": "sha512-uXCGCzTgMZxcSUzutCPtZmXbVC+cvENgS2e0tRuhn+Y1hZnMb8IHP0Trq7Q2MB/eFmG5pKrAeTIUfQIe5kA4Tg==",
"dev": true,
"requires": {
"esutils": "2.0.2",
"lodash": "4.17.5",
"to-fast-properties": "2.0.0"
},
"dependencies": {
"lodash": {
"version": "4.17.5",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz",
"integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==",
"dev": true
}
}
},
"@browserify/acorn5-object-spread": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/@browserify/acorn5-object-spread/-/acorn5-object-spread-5.0.1.tgz",
@ -346,6 +480,20 @@
}
}
},
"babel-eslint": {
"version": "8.2.2",
"resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-8.2.2.tgz",
"integrity": "sha512-Qt2lz2egBxNYWqN9JIO2z4NOOf8i4b5JS6CFoYrOZZTDssueiV1jH/jsefyg+86SeNY3rB361/mi3kE1WK2WYQ==",
"dev": true,
"requires": {
"@babel/code-frame": "7.0.0-beta.40",
"@babel/traverse": "7.0.0-beta.40",
"@babel/types": "7.0.0-beta.40",
"babylon": "7.0.0-beta.40",
"eslint-scope": "3.7.1",
"eslint-visitor-keys": "1.0.0"
}
},
"babel-runtime": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
@ -356,6 +504,12 @@
"regenerator-runtime": "0.11.1"
}
},
"babylon": {
"version": "7.0.0-beta.40",
"resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.40.tgz",
"integrity": "sha512-AVxF2EcxvGD5hhOuLTOLAXBb0VhwWpEX0HyHdAI2zU+AAP4qEwtQj8voz1JR3uclGai0rfcE+dCTHnNMOnimFg==",
"dev": true
},
"backo2": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz",
@ -2188,11 +2342,12 @@
}
},
"eslint-plugin-bpmn-io": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-bpmn-io/-/eslint-plugin-bpmn-io-0.2.0.tgz",
"integrity": "sha512-Omj1TGM/3zeGrEzXG7d0E2uElXdW8kKRMJp4bNxJpwzRREZHbd4+TtuwbLN99K8HmvTeJ23ubOWEozIQYu1dBg==",
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/eslint-plugin-bpmn-io/-/eslint-plugin-bpmn-io-0.5.2.tgz",
"integrity": "sha512-8OaqH6ILElKd26Q1TMjyth7NSmGynBy4tVZxeJUofPcgAKg3eluJxWakRrLFag6yRIpiOujmx87GJsL7HF3Nuw==",
"dev": true,
"requires": {
"babel-eslint": "8.2.2",
"eslint-plugin-mocha": "4.11.0",
"eslint-plugin-react": "7.6.1"
}
@ -3332,6 +3487,15 @@
}
}
},
"invariant": {
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.3.tgz",
"integrity": "sha512-7Z5PPegwDTyjbaeCnV0efcyS6vdKAU51kpEmS7QFib3P4822l8ICYyMn7qvJnc+WzLoDsuI9gPMKbJ8pCu8XtA==",
"dev": true,
"requires": {
"loose-envify": "1.3.1"
}
},
"invert-kv": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz",
@ -3593,6 +3757,12 @@
"dev": true,
"optional": true
},
"jsesc": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.1.tgz",
"integrity": "sha1-5CGiqOINawgZ3yiQj3glJrlt0f4=",
"dev": true
},
"json-parse-better-errors": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.1.tgz",
@ -6089,6 +6259,12 @@
"integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=",
"dev": true
},
"to-fast-properties": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
"integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=",
"dev": true
},
"tough-cookie": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz",
@ -6122,6 +6298,12 @@
}
}
},
"trim-right": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz",
"integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=",
"dev": true
},
"tty-browserify": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz",

View File

@ -47,7 +47,7 @@
"del": "^3.0.0",
"envify": "^4.1.0",
"eslint": "^4.14.0",
"eslint-plugin-bpmn-io": "^0.2.0",
"eslint-plugin-bpmn-io": "^0.5.2",
"execa": "^0.8.0",
"jsondiffpatch": "^0.1.26",
"karma": "^1.7.0",

View File

@ -16,12 +16,12 @@ function TranslationReporter() {
this.onBrowserLog = function(browser, log, type) {
if ( log === undefined || typeof log !== 'string' ) {
if (log === undefined || typeof log !== 'string') {
return;
}
if ( log.substring( 0, 1 ) === '\'' ) {
log = log.substring( 1, log.length - 1 );
if (log.substring(0, 1) === '\'') {
log = log.substring(1, log.length - 1);
}
try {

View File

@ -49,7 +49,7 @@ describe.skip('scenario - successive reopening', function() {
}
if (event.warnings && event.warnings.length) {
console.warn('WARNINGS', event.warnings );
console.warn('WARNINGS', event.warnings);
}
});

View File

@ -26,7 +26,7 @@ function CustomRenderer(eventBus, styles) {
return self.drawTriangle(parentGfx, element.width);
},
'custom:circle': function(parentGfx, element, attrs) {
return self.drawCircle(parentGfx, element.width, element.height, attrs);
return self.drawCircle(parentGfx, element.width, element.height, attrs);
}
};

View File

@ -66,7 +66,7 @@ describe('features/move - drop', function() {
// given
var task_1 = elementRegistry.get('ID_Task_1'),
parent = elementRegistry.get('ID_SubProcess_1'),
flow = elementRegistry.get('ID_Sequenceflow_1');
flow = elementRegistry.get('ID_Sequenceflow_1');
// when
modeling.moveElements([ task_1 ], { x: 0, y: 200 }, parent);
@ -85,7 +85,7 @@ describe('features/move - drop', function() {
var task_1 = elementRegistry.get('ID_Task_1'),
task_2 = elementRegistry.get('ID_Task_2'),
parent = elementRegistry.get('ID_SubProcess_1'),
flow = elementRegistry.get('ID_Sequenceflow_1');
flow = elementRegistry.get('ID_Sequenceflow_1');
// when
modeling.moveElements([ task_1, task_2 ], { x: 0, y: 250 }, parent);

View File

@ -123,14 +123,14 @@ describe('features/modeling - update properties', function() {
it('updating conditional flow on source replace', inject(
function(bpmnReplace, elementRegistry) {
//given
// given
var conditionalFlow = elementRegistry.get('SequenceFlow_3'),
conditionalBo = conditionalFlow.businessObject,
serviceTask = elementRegistry.get('ServiceTask_1');
var conditionExpression = conditionalBo.conditionExpression;
var userTaskData = {
var userTaskData = {
type: 'bpmn:UserTask'
};
@ -146,14 +146,14 @@ describe('features/modeling - update properties', function() {
it('updating conditional flow on target replace', inject(
function(bpmnReplace, elementRegistry) {
//given
// given
var conditionalFlow = elementRegistry.get('SequenceFlow_3'),
conditionalBo = conditionalFlow.businessObject,
endEvent = elementRegistry.get('EndEvent_1');
var conditionExpression = conditionalBo.conditionExpression;
var messageEndEventData = {
var messageEndEventData = {
type: 'bpmn:EndEvent',
eventDefinitionType: 'bpmn:MessageEventDefinition'
};

View File

@ -87,13 +87,13 @@ describe('features/modeling - append text-annotation', function() {
it('with right size', inject(function(elementRegistry, elementFactory, modeling) {
//given
// given
var eventShape = elementRegistry.get('IntermediateCatchEvent_1');
//when
// when
var annotationShape = modeling.appendShape(eventShape, { type: 'bpmn:TextAnnotation' });
//then
// then
expect(annotationShape.width).to.eql(100);
expect(annotationShape.height).to.eql(30);
}));

View File

@ -148,7 +148,7 @@ describe('features/modeling - collapse and expand elements', function() {
);
// then
var newMid = {
var newMid = {
x: expandedSubProcess.x + expandedSubProcess.width / 2,
y: expandedSubProcess.y + expandedSubProcess.height / 2
};

View File

@ -31,7 +31,7 @@ describe('features/modeling - delete default connection', function() {
// then
expect(defaultConnection.parent).to.be.null;
expect(gateway.businessObject.default).to.be.null; //.property('default');
expect(gateway.businessObject.default).to.be.null; // .property('default');
}));

View File

@ -84,9 +84,9 @@ describe('modeling/behavior/util - GeometricUtil', function() {
var angle = GeometricUtil.getAngle(testLines[i].line);
// to degree
angle = angle * ( 180 / Math.PI );
angle = angle * (180 / Math.PI);
//then
// then
expect(angle).to.be.equal(testLines[i].angle);
}
});
@ -105,7 +105,7 @@ describe('modeling/behavior/util - GeometricUtil', function() {
for (var i=0; i<testVectors.length; i++) {
// degree to radian
var angle = testVectors[i].angle * ( Math.PI / 180 );
var angle = testVectors[i].angle * (Math.PI / 180);
// when
var rotatedVector = GeometricUtil.rotateVector(testVectors[i].vector, angle);

View File

@ -1127,7 +1127,7 @@ describe('features/popup-menu - replace menu provider', function() {
// given
var sequenceFlow = elementRegistry.get('SequenceFlow_3');
//when
// when
openPopup(sequenceFlow);
var entries = getEntries(popupMenu);
@ -1885,7 +1885,7 @@ describe('features/popup-menu - replace menu provider', function() {
return true;
});
//when
// when
openPopup(startEvent);
var entries = getEntries(popupMenu);

View File

@ -37,7 +37,7 @@ describe('features/replace - bpmn replace', function() {
// given
var task = elementRegistry.get('Task_1');
var newElementData = {
var newElementData = {
type: 'bpmn:UserTask'
};
@ -56,7 +56,7 @@ describe('features/replace - bpmn replace', function() {
// given
var gateway = elementRegistry.get('ExclusiveGateway_1');
var newElementData = {
var newElementData = {
type: 'bpmn:InclusiveGateway'
};
@ -289,7 +289,7 @@ describe('features/replace - bpmn replace', function() {
// given
var task = elementRegistry.get('Task_1');
var newElementData = {
var newElementData = {
type: 'bpmn:UserTask'
};
@ -308,7 +308,7 @@ describe('features/replace - bpmn replace', function() {
var startEvent = elementRegistry.get('StartEvent_1');
var label = elementRegistry.get('StartEvent_1_label');
var newElementData = {
var newElementData = {
type: 'bpmn:EndEvent'
};
@ -335,7 +335,7 @@ describe('features/replace - bpmn replace', function() {
// given
var task = elementRegistry.get('Task_1');
var newElementData = {
var newElementData = {
type: 'bpmn:UserTask'
};
@ -362,7 +362,7 @@ describe('features/replace - bpmn replace', function() {
// given
var task = elementRegistry.get('Task_1');
var newElementData = {
var newElementData = {
type: 'bpmn:UserTask'
};
@ -381,7 +381,7 @@ describe('features/replace - bpmn replace', function() {
// given
var startEvent = elementRegistry.get('StartEvent_1');
var newElementData = {
var newElementData = {
type: 'bpmn:EndEvent'
};
@ -411,7 +411,7 @@ describe('features/replace - bpmn replace', function() {
// given
var task = elementRegistry.get('Task_1');
var newElementData = {
var newElementData = {
type: 'bpmn:UserTask'
};
@ -433,10 +433,10 @@ describe('features/replace - bpmn replace', function() {
// given
var task = elementRegistry.get('Task_1');
var newElementData = {
var newElementData = {
type: 'bpmn:UserTask'
};
var newElementData2 = {
var newElementData2 = {
type: 'bpmn:ServiceTask'
};
@ -473,7 +473,7 @@ describe('features/replace - bpmn replace', function() {
// given
var task = elementRegistry.get('Task_1');
var newElementData = {
var newElementData = {
type: 'bpmn:UserTask'
};
@ -497,7 +497,7 @@ describe('features/replace - bpmn replace', function() {
// given
var task = elementRegistry.get('StartEvent_1');
var newElementData = {
var newElementData = {
type: 'bpmn:EndEvent'
};
@ -513,7 +513,7 @@ describe('features/replace - bpmn replace', function() {
// given
var task = elementRegistry.get('EndEvent_1');
var newElementData = {
var newElementData = {
type: 'bpmn:StartEvent'
};
@ -531,7 +531,7 @@ describe('features/replace - bpmn replace', function() {
// given
var task = elementRegistry.get('Task_1');
var newElementData = {
var newElementData = {
type: 'bpmn:UserTask'
};
@ -559,7 +559,7 @@ describe('features/replace - bpmn replace', function() {
// given
var startEvent = elementRegistry.get('StartEvent_1');
var newElementData = {
var newElementData = {
type: 'bpmn:EndEvent'
};
@ -587,7 +587,7 @@ describe('features/replace - bpmn replace', function() {
// given
var endEvent = elementRegistry.get('EndEvent_1');
var newElementData = {
var newElementData = {
type: 'bpmn:StartEvent'
};
@ -600,7 +600,7 @@ describe('features/replace - bpmn replace', function() {
var newEvent = elementRegistry.get('EndEvent_1');
var incoming = newEvent.incoming[0],
outgoing = newEvent.outgoing[0],
source = incoming.source;
source = incoming.source;
expect(incoming).to.exist;
expect(outgoing).not.to.exist;
@ -618,7 +618,7 @@ describe('features/replace - bpmn replace', function() {
// given
var task = elementRegistry.get('Task_1');
var newElementData = {
var newElementData = {
type: 'bpmn:UserTask'
};
var newElement = bpmnReplace.replaceElement(task, newElementData);
@ -647,7 +647,7 @@ describe('features/replace - bpmn replace', function() {
// given
var startEvent = elementRegistry.get('StartEvent_1');
var newElementData = {
var newElementData = {
type: 'bpmn:EndEvent'
};
var newElement = bpmnReplace.replaceElement(startEvent, newElementData);
@ -672,7 +672,7 @@ describe('features/replace - bpmn replace', function() {
// given
var endEvent = elementRegistry.get('EndEvent_1');
var newElementData = {
var newElementData = {
type: 'bpmn:StartEvent'
};
var newElement = bpmnReplace.replaceElement(endEvent, newElementData);
@ -711,7 +711,7 @@ describe('features/replace - bpmn replace', function() {
var taskShape = elementRegistry.get('Task_2');
var sequenceFlowConnection = elementRegistry.get('SequenceFlow_4');
var transactionShapeData = {
var transactionShapeData = {
type: 'bpmn:Transaction'
};
@ -941,7 +941,7 @@ describe('features/replace - bpmn replace', function() {
// given
var task = elementRegistry.get('Task_1');
var newElementData = {
var newElementData = {
type: 'bpmn:ServiceTask'
};
@ -967,7 +967,7 @@ describe('features/replace - bpmn replace', function() {
// given
var transaction = elementRegistry.get('SubProcess_1');
var newElementData = {
var newElementData = {
type: 'bpmn:SubProcess',
triggeredByEvent: true
};
@ -1299,7 +1299,7 @@ describe('features/replace - bpmn replace', function() {
it('should copy properties', inject(function(elementRegistry, bpmnReplace) {
// given
var task = elementRegistry.get('Task_1');
var newElementData = {
var newElementData = {
type: 'bpmn:ServiceTask'
};
@ -1359,7 +1359,7 @@ describe('features/replace - bpmn replace', function() {
// given
var task = elementRegistry.get('Task_1');
var newElementData = {
var newElementData = {
type: 'bpmn:UserTask'
},
fill = '#BBDEFB',

View File

@ -26,7 +26,7 @@ describe('features/replace - rules', function() {
// given
var element = elementRegistry.get('ExclusiveGateway_140v6lc');
var target = {
var target = {
type: 'bpmn:EventBasedGateway'
};
@ -44,7 +44,7 @@ describe('features/replace - rules', function() {
// given
var element = elementRegistry.get('StartEvent_1');
var target = {
var target = {
type: 'bpmn:EndEvent'
};
@ -61,7 +61,7 @@ describe('features/replace - rules', function() {
// given
var element = elementRegistry.get('EndEvent_1');
var target = {
var target = {
type: 'bpmn:StartEvent'
};

View File

@ -200,11 +200,11 @@ describe('import - Importer', function() {
runImport(diagram, xml, function(err, warnings) {
//round up
// round up
expect(events.ID_End.x).to.equal(Math.round(340.6));
expect(events.ID_End.y).to.equal(Math.round(136.6));
//round down
// round down
expect(events.ID_Start.x).to.equal(Math.round(120.4));
expect(events.ID_Start.y).to.equal(Math.round(135.4));
@ -226,7 +226,7 @@ describe('import - Importer', function() {
runImport(diagram, xml, function(err, warnings) {
//round down
// round down
expect(events.ID_Start.height).to.equal(Math.round(30.4));
expect(events.ID_Start.width).to.equal(Math.round(30.4));