diff --git a/demos/state.html b/demos/state.html index 57f89779c..dbe2286a3 100644 --- a/demos/state.html +++ b/demos/state.html @@ -61,23 +61,31 @@ class Still notMoving class Moving, Crash movement class Crash badBadEvent -
-    stateDiagram
+    stateDiagram-v2
       accTitle: very very simple state
     accDescr: This is a state diagram showing one state
     State1
     
-
+ +

You can label the relationships

+
+    stateDiagram-v2
+    [*] --> State1
+    State1 --> State2 : Transition 1
+    State1 --> State3 : Transition 2
+    State1 --> State4 : Transition 3
+    State1 --> [*]
+    
+
+

This shows Composite states

-
-
     stateDiagram-v2
     [*] --> First
     First --> Second
@@ -95,31 +103,48 @@
         [*] --> 3rd
         3rd --> [*]
     }
+    
+
+

Compsite states can link to themselves

+
+      stateDiagram-v2
+            state Active {
+              Idle
+            }
+            Inactive --> Idle: ACT
+            Active --> Active: LOG
+    
+
+ +

transition labels can span multiple lines using "br" tags or \n

+
+      stateDiagram-v2
+      [*] --> S1
+      S1 --> S2: This long line uses a br tag
to create multiple
lines. + S1 --> S3: This transition descripton uses \na newline character\nto create multiple\nlines.
+
+ +

You can add Notes

-    stateDiagram
-    State1: The state with a note
-    note right of State1
-    Important information! You can write
-    notes.
-    end note
-    State1 --> State2
-    note left of State2 : This is the note to the left.
-    
-
-    stateDiagram
-    State1
-    note right of State1
-    Line1
Line2
Line3
Line4
Line5 - end note + stateDiagram-v2 + direction LR + State1: A state with a note + note right of State1 + Important information!
You can write notes.
And\nthey\ncan\nbe\nmulti-\nline. + end note + State1 --> State2 + note left of State2 : Notes can be to the left of a state\n(like this one). + note right of State2 : Notes can be to the right of a state\n(like this one).
+