Skip to content

Commit

Permalink
Tweaks examples a bit.
Browse files Browse the repository at this point in the history
  • Loading branch information
Corey Burrows committed Oct 31, 2013
1 parent 7879e9b commit 24034ae
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ More information on statecharts is available here:
* http://www.wisdom.weizmann.ac.il/~harel/papers/Statecharts.History.pdf
* http://www.amazon.com/Constructing-User-Interface-Statecharts-Horrocks/dp/0201342782

# Example
## Examples

## Lockable Door
### Lockable Door

```javascript
var State = (typeof require === 'function' ? require('statechart') : window.statechart).State;
Expand Down Expand Up @@ -60,7 +60,7 @@ door.send('lockDoor');
door.current(); // => [ '/closed/locked' ]
```

## Shallow History State
### Shallow History State

```javascript
var State = (typeof require === 'function' ? require('statechart') : window.statechart).State;
Expand Down Expand Up @@ -92,7 +92,7 @@ sc.goto('/a');
sc.current(); // => ['/a/a.2']
```

## Deep History State
### Deep History State

```javascript
var State = (typeof require === 'function' ? require('statechart') : window.statechart).State;
Expand Down Expand Up @@ -143,7 +143,7 @@ sc.goto('/b');
sc.current(); // => ['/b/b.2/b.2.3']
```

## Concurrency
### State Concurrency

```javascript
var State = (typeof require === 'function' ? require('statechart') : window.statechart).State;
Expand Down Expand Up @@ -198,7 +198,7 @@ var word = State.define({concurrent: true}, function() {
});
});

this.event('reset', function() { this.goto(); });
this.event('resetClicked', function() { this.goto(); });
});

word.goto();
Expand All @@ -225,7 +225,7 @@ word.current(); // => ['/bold/on', '/underline/on', '/align/justify', '/bullets/
word.send('numberClicked');
word.current(); // => ['/bold/on', '/underline/on', '/align/justify', '/bullets/number']

word.send('reset');
word.send('resetClicked');
word.current(); // => ['/bold/off', '/underline/off', '/align/left', '/bullets/none']
```

0 comments on commit 24034ae

Please sign in to comment.