浏览代码

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

flowchartTest
jos 10 年前
父节点
当前提交
3970ccce5d
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. +6
    -0
      docs/timeline/index.html

+ 6
- 0
docs/timeline/index.html 查看文件

@ -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>

正在加载...
取消
保存