1 | import RRText from './rrtext';
|
2 | import RRDiagram from './rrdiagram'
|
3 |
|
4 | const BoxShape = {
|
5 | RECTANGLE: 1,
|
6 | ROUNDED_RECTANGLE: 2,
|
7 | HEXAGON: 3,
|
8 | };
|
9 |
|
10 | export default class RRDiagramToSVG {
|
11 |
|
12 | static get BoxShape() {
|
13 | return BoxShape;
|
14 | }
|
15 |
|
16 | constructor() {
|
17 | this.cssConnectorClass = "rrConnector";
|
18 | this.cssRuleClass = "rrRule";
|
19 | this.cssRuleTextClass = "rrRuleText";
|
20 | this.cssLiteralClass = "rrLiteral";
|
21 | this.cssLiteralTextClass = "rrLiteralText";
|
22 | this.cssSpecialSequenceClass = "rrSpecialSequence";
|
23 | this.cssSpecialSequenceTextClass = "rrSpecialSequenceText";
|
24 | this.cssLoopCardinalitiesTextClass = "rrLoopCardinalities";
|
25 | this.ruleShape = BoxShape.RECTANGLE;
|
26 | this.literalShape = BoxShape.ROUNDED_RECTANGLE;
|
27 | this.specialSequenceShape = BoxShape.HEXAGON;
|
28 | }
|
29 |
|
30 | |
31 |
|
32 |
|
33 |
|
34 | convert(rrDiagram) {
|
35 | return rrDiagram.toSVG(this);
|
36 | }
|
37 |
|
38 | } |
\ | No newline at end of file |