Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REFACTOR] simplify BpmnCanvas creation in IconPainter #495

Merged
merged 3 commits into from
Aug 11, 2020

Conversation

tbouffard
Copy link
Member

@tbouffard tbouffard commented Aug 11, 2020

Remove duplication by introducing a method in charge of creating a new
BpmnCanvas instance using a PaintParameter and additional arguments.
This will also simplify implementation of new icons and extensions.

@tbouffard tbouffard added depends on another PR ⚠️ Pull request depending on another one. The depending must be merged first refactoring Code refactoring labels Aug 11, 2020
@tbouffard tbouffard changed the title [REFACTOR] simplify BpmnCanvas creation in IconPainter.ts [REFACTOR] simplify BpmnCanvas creation in IconPainter Aug 11, 2020
Remove duplication by introducing a method in charge of creating a new
`BpmnCanvas` instance using a `PaintParameter` and additional arguments.
@tbouffard tbouffard force-pushed the refactor/simplify_BpmnCanvas_creation_in_IconPainter branch from 91b4f87 to 4d5ac50 Compare August 11, 2020 08:12
@tbouffard tbouffard removed the depends on another PR ⚠️ Pull request depending on another one. The depending must be merged first label Aug 11, 2020
@tbouffard tbouffard marked this pull request as ready for review August 11, 2020 08:12
public paintEnvelopeIcon({ c, ratioFromParent, setIconOrigin, shape, icon }: PaintParameter): void {
const originalIconSize = { width: 485.41, height: 321.76 };
const canvas = new BpmnCanvas({
protected newBpmnCanvas({ c, ratioFromParent, setIconOrigin, shape, icon }: PaintParameter, originalIconSize: Size): BpmnCanvas {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@csouchet csouchet merged commit e575d77 into master Aug 11, 2020
@csouchet csouchet deleted the refactor/simplify_BpmnCanvas_creation_in_IconPainter branch August 11, 2020 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Code refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants