-
Notifications
You must be signed in to change notification settings - Fork 1
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
[PF-48] - Builder integration changes #5
Conversation
- add support for svg grid bakcground
- replace panzoom with @panzoom/panzoom
- fix import in grid configuration - add option for cursor type - remove unused css class
- add isActive function for activable classes - rename functions for better readability
- rename functions for better readability
- fix lasso tool - fix moving of canvas on each mouse down + move event
- add select tool - add event propagation
- fix arc removal
- decoupling library
- decouple library stage 1
- decouple library stage 2 with modeler necessary functions
- changes to behavior of marking nodes of place
- add comments for future rework
- push old
- merge canvas configuration service with canvas service
- fix problem with marker ends of arcs not highlighted on hover
- add function to get all child elements of canvas element
- make Container not abstract to use in Canvas - add containers for arcs, places and transition to fix ordering in svg element - add static methods for creating petriflow.svg elements without instantiating petri.svg elements
- fix background position i svg DOM tree
- fix background position of labels
- fix background position of labels
- fix empty label showing background - add updateLine method to repaint arc line points
- remove events on mouse over/out - add comments for future refactor
- remove radius from canvas config, use size instead - add missing abstract deactivate method to petriflow canvas element
@@ -1,12 +1,15 @@ | |||
<mat-toolbar fxLayout="row" class="app-container mat-toolbar mat-toolbar-single-row"> | |||
<mat-toolbar-row fxFlex> | |||
<mat-icon id="netgrif-icon" svgIcon="netgrif_logo"></mat-icon> | |||
<mat-button-toggle-group [value]="_mode" fxLayoutAlign="start end"> | |||
<mat-button-toggle-group [(ngModel)]="_mode" fxLayoutAlign="start end"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why ngModel
? Can be done with FormGroup
https://angular.io/api/forms/FormGroup
}) | ||
export class ControlPetriflowCanvasService extends PetriflowCanvasService { | ||
|
||
private arcTypes = ['regular', 'reset', 'inhibitor', 'read']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could reference the enum values? Why separate?
|
||
selectAll() { | ||
this.petriflowElementsCollection.all.forEach(element => { | ||
element.select(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setSelectedByRectangleEnclosure
method does setSelected(true)
and activate()
. Why are there differences?
this.moveBreakpoint(e); | ||
if (this.mouseDown && this.mode === CanvasMode.LASSO) { | ||
if (!this.canvas) { | ||
throw new Error('SVG canvas for petriflow objects doesn\'t exists!'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the \
could be dropped if " or ` was used do delimit the string
}; | ||
|
||
addTransitionEvents(petriflowTransition: PetriflowTransition): void { | ||
// @ts-ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is the @ts-ignore
needed?
}); | ||
} | ||
|
||
// @ts-ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why @ts-ignore
?
} | ||
if (this._source.canvasElement instanceof Place) { | ||
switch (type) { | ||
case 'regular': { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not enum values?
return undefined; | ||
} | ||
|
||
// @ts-ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why @ts-ignore
?
} | ||
} | ||
if (this._mode === CanvasMode.SELECT) { | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
empty if
- fix missing svg element ids
- fix missing svg element ids
- fix missing svg container ids
- fix missing svg container ids
- fix id label
- fix label background incorrect size
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
All comments are about the example-app which is subject of planned refactor in the next release. |
Description
Code refactor and changes made by integration into builder. Example project should be updated in near future to reflect builder implementation changes (marked with
// TODO: PF-48
comments).Implements PF-48