Browse Source

Added a usage example for `getEventPropeties(event)` (see #901)

flowchartTest
jos 9 years ago
parent
commit
3970ccce5d
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      docs/timeline/index.html

+ 6
- 0
docs/timeline/index.html View File

@ -1001,6 +1001,12 @@ function (option, path) {
<li><code>what</code> (String or null): name of the clicked thing: <code>item</code>, <code>background</code>, <code>axis</code>, <code>group-label</code>, <code>custom-time</code>, or <code>current-time</code>.</li> <li><code>what</code> (String or null): name of the clicked thing: <code>item</code>, <code>background</code>, <code>axis</code>, <code>group-label</code>, <code>custom-time</code>, or <code>current-time</code>.</li>
<li><code>event</code> (Object): the original click event.</li> <li><code>event</code> (Object): the original click event.</li>
</ul> </ul>
Example usage:
<pre class="prettyprint lang-js">
document.getElementById('myTimeline').onclick = function (event) {
var props = timeline.getEventProperties(event)
console.log(props);
}</pre>
</td> </td>
</tr> </tr>

Loading…
Cancel
Save