Skip to content

Commit

Permalink
Merge pull request mermaidjs#10 from mrtndwrd/patch-1
Browse files Browse the repository at this point in the history
Fix some typos in usage.md
  • Loading branch information
tylerlong authored Feb 5, 2018
2 parents 224816e + 950498c commit 418e513
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion content/flowchart.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ It is also possible to attach a class to a list of nodes in one statement:

### Css classes

It is also possible to pre dine classes in css styles that can be applied from the graph definition as in the example
It is also possible to predefine classes in css styles that can be applied from the graph definition as in the example
below:

**Example style**
Expand Down
10 changes: 5 additions & 5 deletions content/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ $(document).load(function() {
});
```

over
or

```javascript
$(document).ready(function() {
Expand Down Expand Up @@ -167,8 +167,8 @@ could be used. The example just logs the resulting svg to the javascript console
Sometimes the generated graph also has defined interactions like tooltip and click events. When using the API one must
add those events after the graph has been inserted into the DOM.

The example code below is an extract of wheat mermaid does when using the API. The example show how it is possible to
bind events to a svg when using the API for rendering.
The example code below is an extract of what mermaid does when using the API. The example shows how it is possible to
bind events to an svg when using the API for rendering.

```javascript
var insertSvg = function(svgCode, bindFunctions) {
Expand All @@ -186,10 +186,10 @@ mermaidAPI.render(id,txt,insertSvg, element);
```

1. The graph is generated using the render call.
2. After generation the render function calls the provided callback function, in this case its called insertSvg.
2. After generation the render function calls the provided callback function, in this case it's called insertSvg.
3. The callback function is called with two parameters, the svg code of the generated graph and a function. This function binds events to the svg **after** it is inserted into the DOM.
4. Insert the svg code into the DOM for presentation
5. Call the binding function that bainds the events
5. Call the binding function that binds the events


## Example of a marked renderer
Expand Down

0 comments on commit 418e513

Please sign in to comment.