Skip to content

Commit

Permalink
Added firing dragover event (#107)
Browse files Browse the repository at this point in the history
Cool thanks!
  • Loading branch information
apwidejulien authored and yotamberk committed Sep 20, 2019
1 parent 7de3236 commit 6264787
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/timeline/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1736,6 +1736,15 @@ <h2 id="Events">Events</h2>
</td>
</tr>

<tr>
<td>dragover</td>
<td>
Passes a properties object as returned by the method <a href="#getEventProperties"><code>Timeline.getEventProperties(event)</code></a>.
</td>
<td>Fired when dragging over a timeline element.
</td>
</tr>

<tr>
<td>drop</td>
<td>
Expand All @@ -1745,7 +1754,6 @@ <h2 id="Events">Events</h2>
</td>
</tr>


<tr>
<td>mouseOver</td>
<td>
Expand Down
1 change: 1 addition & 0 deletions lib/timeline/Core.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ class Core {
*/
function handleDragOver(event) {
if (event.preventDefault) {
me.emit('dragover', me.getEventProperties(event));
event.preventDefault(); // Necessary. Allows us to drop.
}

Expand Down

0 comments on commit 6264787

Please sign in to comment.