Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
csouchet committed Aug 29, 2023
1 parent 366b50e commit b7ca066
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
28 changes: 14 additions & 14 deletions dev/ts/component/ThemedBpmnVisualization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,43 +140,43 @@ export class ThemedBpmnVisualization extends BpmnVisualization {
break;
}
const style = styleSheet.styles[kind];
style['fillColor'] = fillColor;
style['strokeColor'] = strokeColor;
style.fillColor = fillColor;
style.strokeColor = strokeColor;
});

// TASK
ShapeUtil.taskKinds().forEach(kind => {
const style = styleSheet.styles[kind];
style['fillColor'] = theme.taskAndCallActivityFillColor;
style.fillColor = theme.taskAndCallActivityFillColor;
});

// CALL ACTIVITY
const callActivityStyle = styleSheet.styles[ShapeBpmnElementKind.CALL_ACTIVITY];
callActivityStyle['fillColor'] = theme.taskAndCallActivityFillColor;
callActivityStyle.fillColor = theme.taskAndCallActivityFillColor;

// TEXT ANNOTATION
const textAnnotationStyle = styleSheet.styles[ShapeBpmnElementKind.TEXT_ANNOTATION];
textAnnotationStyle['fillColor'] = theme.textAnnotationFillColor ?? StyleDefault.TEXT_ANNOTATION_FILL_COLOR;
textAnnotationStyle.fillColor = theme.textAnnotationFillColor ?? StyleDefault.TEXT_ANNOTATION_FILL_COLOR;

// POOL
const poolStyle = styleSheet.styles[ShapeBpmnElementKind.POOL];
poolStyle['fillColor'] = theme.poolFillColor;
poolStyle['swimlaneFillColor'] = theme.defaultFillColor;
poolStyle.fillColor = theme.poolFillColor;
poolStyle.swimlaneFillColor = theme.defaultFillColor;

// LANE
const laneStyle = styleSheet.styles[ShapeBpmnElementKind.LANE];
laneStyle['fillColor'] = theme.laneFillColor;
laneStyle.fillColor = theme.laneFillColor;

// DEFAULTS
const defaultVertexStyle = styleSheet.getDefaultVertexStyle();
defaultVertexStyle['fontColor'] = theme.defaultFontColor;
defaultVertexStyle['fillColor'] = theme.defaultFillColor;
defaultVertexStyle['strokeColor'] = theme.defaultStrokeColor;
defaultVertexStyle.fontColor = theme.defaultFontColor;
defaultVertexStyle.fillColor = theme.defaultFillColor;
defaultVertexStyle.strokeColor = theme.defaultStrokeColor;

const defaultEdgeStyle = styleSheet.getDefaultEdgeStyle();
defaultEdgeStyle['fontColor'] = theme.defaultFontColor;
defaultEdgeStyle['fillColor'] = theme.defaultFillColor;
defaultEdgeStyle['strokeColor'] = theme.flowColor ?? theme.defaultStrokeColor;
defaultEdgeStyle.fontColor = theme.defaultFontColor;
defaultEdgeStyle.fillColor = theme.defaultFillColor;
defaultEdgeStyle.strokeColor = theme.flowColor ?? theme.defaultStrokeColor;

// theme configuration completed
return true;
Expand Down
2 changes: 1 addition & 1 deletion scripts/utils/parseBpmn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { readFileSync } from '../../test/shared/file-helper';
const __dirname = resolvePath();
const argv = parseArgs(process.argv.slice(2));
const bpmnFilePath = argv._[0];
const outputType = argv['output'] || 'json';
const outputType = argv.output || 'json';

// eslint-disable-next-line no-console
console.info('Generating BPMN in the "%s" output type', outputType);
Expand Down
6 changes: 3 additions & 3 deletions src/component/parser/json/converter/DiagramConverter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,12 @@ export default class DiagramConverter {
if ('background-color' in bpmnShape) {
shape.extensions.fillColor = bpmnShape['background-color'] as string;
} else if ('fill' in bpmnShape) {
shape.extensions.fillColor = bpmnShape['fill'] as string;
shape.extensions.fillColor = bpmnShape.fill as string;
}
if ('border-color' in bpmnShape) {
shape.extensions.strokeColor = bpmnShape['border-color'] as string;
} else if ('stroke' in bpmnShape) {
shape.extensions.strokeColor = bpmnShape['stroke'] as string;
shape.extensions.strokeColor = bpmnShape.stroke as string;
}
}

Expand Down Expand Up @@ -183,7 +183,7 @@ export default class DiagramConverter {
if ('border-color' in bpmnEdge) {
edge.extensions.strokeColor = bpmnEdge['border-color'] as string;
} else if ('stroke' in bpmnEdge) {
edge.extensions.strokeColor = bpmnEdge['stroke'] as string;
edge.extensions.strokeColor = bpmnEdge.stroke as string;
}
}

Expand Down

0 comments on commit b7ca066

Please sign in to comment.