You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: guides/documentations/essentials.md
+11-6Lines changed: 11 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,11 +27,13 @@ ComponentAttributeDefinition.js, // Class that defines Component Attributes' dat
27
27
ComponentDrawOption.js, // Class that represents option for the Component drawing.
28
28
ComponentLink.js, // Class that links Components together.
29
29
ComponentLinkDefinition.js, // Class that defines of the link between Components.
30
+
ComponentRenderer.js// Class that render each components to draw the diagram.
31
+
LinkRenderer.js// Class that render each links to draw the diagram.
30
32
ParserLog.js, // Class that represents a parsing log. Used by the DefaultParser as default log.
31
33
FileInformation.js, // Class that represents the object to store all file information.
32
34
FileInput.js, // Class that represents the object to store the file content.
33
35
Tag.js, // Class that represents a tag in Leto-modelizer. Used by the DefaultConfiguration class.
34
-
Variable.js,// Class that represents a variable in a file of a diagram. Used by the DefaultData class.
36
+
Variable.js// Class that represents a variable in a file of a diagram. Used by the DefaultData class.
35
37
```
36
38
37
39
| Plugin lifecycle |
@@ -41,7 +43,7 @@ Variable.js, // Class that represents a variable in a file o
41
43
This is the default lifecycle of plugin usage in Leto Modelizer.
42
44
43
45
As you can see, plugin-core can be divided in 5 distinct parts:
44
-
- Metadata managment
46
+
- Metadata management
45
47
- Generate components from source files (Parser)
46
48
- Generate source files from components (Renderer)
47
49
- Draw diagrams
@@ -161,7 +163,11 @@ By default, the DefaultDrawer is using [D3 library](https://d3js.org/) to draw t
161
163
162
164
### Custom Layout
163
165
164
-
We use the [Elk library](https://eclipse.dev/elk/) to automatically arrange all components with optimal position. Check out the ElkLayout Class to learn how Elk is used for generating a layout. We structured the code to be able to implement another way of managing the layout. Check out the DefaultLayout Class with `arrangeComponentsPosition` and `repositionComponent` methods that can be overridden to implement your own algorithm for automatic components layout.
166
+
We use a custom algorithm to automatically arrange all components with optimal position.
167
+
168
+
We structured the code to be able to implement another way of managing the layout.
169
+
170
+
Check out the DefaultLayout Class with `generateComponentsLayout` and `resize` methods that can be overridden to implement your own algorithm for automatic components layout.
165
171
166
172
### Custom component template
167
173
@@ -222,10 +228,9 @@ Here you will find a diagram summarizing the key steps in the plugin-core proces
222
228
## Going further
223
229
224
230
Components have the (internal) id and the external id.
225
-
These two differs in their usage, the id is mostly used internally (drawing, links, etc...) and should never be changed once the component is created.
231
+
These two differ in their usage, the id is mostly used internally (drawing, links, etc...) and should never be changed once the component is created.
226
232
Whereas the external id (defaulted to the id's value), is used for all other purposes and this one is to be seen by the user of Leto-Modelizer.
227
-
As the id is used for all internal matters, several components can have the same external id and it won't affect any links or anything else
228
-
(for an example see terrator-plugin).
233
+
As the id is used for all internal matters, several components can have the same external id, and it won't affect any links or anything else (for an example see terrator-plugin).
0 commit comments