mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-21 16:29:40 +02:00
Merge branch 'develop' of https://github.com/mermaid-js/mermaid into 5367/architecture-diagram
This commit is contained in:
@@ -113,6 +113,7 @@ export const clear = function () {
|
||||
functions.push(setupToolTips);
|
||||
namespaces = new Map();
|
||||
namespaceCounter = 0;
|
||||
direction = 'TB';
|
||||
commonClear();
|
||||
};
|
||||
|
||||
|
@@ -444,6 +444,17 @@ class C13["With Città foreign language"]
|
||||
]
|
||||
`);
|
||||
});
|
||||
|
||||
it('should revert direction to default once direction is removed', () => {
|
||||
parser.parse(`classDiagram
|
||||
direction RL
|
||||
class A`);
|
||||
expect(classDb.getDirection()).toBe('RL');
|
||||
classDb.clear();
|
||||
parser.parse(`classDiagram
|
||||
class B`);
|
||||
expect(classDb.getDirection()).toBe('TB');
|
||||
});
|
||||
});
|
||||
|
||||
describe('when parsing class defined in brackets', function () {
|
||||
|
@@ -288,8 +288,8 @@ a _[valid CSS property name](https://www.w3.org/TR/CSS/#properties)_ followed by
|
||||
|
||||
Here is an example of a classDef with just one property-value pair:
|
||||
|
||||
```
|
||||
classDef movement font-style:italic;
|
||||
```txt
|
||||
classDef movement font-style:italic;
|
||||
```
|
||||
|
||||
where
|
||||
@@ -301,8 +301,8 @@ If you want to have more than one _property-value pair_ then you put a comma (`,
|
||||
|
||||
Here is an example with three property-value pairs:
|
||||
|
||||
```
|
||||
classDef badBadEvent fill:#f00,color:white,font-weight:bold,stroke-width:2px,stroke:yellow
|
||||
```txt
|
||||
classDef badBadEvent fill:#f00,color:white,font-weight:bold,stroke-width:2px,stroke:yellow
|
||||
```
|
||||
|
||||
where
|
||||
@@ -327,7 +327,7 @@ There are two ways to apply a `classDef` style to a state:
|
||||
A `class` statement tells Mermaid to apply the named classDef to one or more classes. The form is:
|
||||
|
||||
```txt
|
||||
class [one or more state names, separated by commas] [name of a style defined with classDef]
|
||||
class [one or more state names, separated by commas] [name of a style defined with classDef]
|
||||
```
|
||||
|
||||
Here is an example applying the `badBadEvent` style to a state named `Crash`:
|
||||
|
Reference in New Issue
Block a user