Skip to content

Commit

Permalink
Merge remote-tracking branch 'mmajcica/patch-1'
Browse files Browse the repository at this point in the history
Merging mmajcica's changes to introduce 'plotdblclick' event.
  • Loading branch information
ashrafhasson committed Apr 24, 2013
2 parents 24f70fc + 67127a4 commit 1b3977d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion jquery.flot.js
Original file line number Diff line number Diff line change
Expand Up @@ -1221,7 +1221,9 @@ Licensed under the MIT license.

if (options.grid.clickable)
eventHolder.click(onClick);


eventHolder.dblclick(onDblClick)

executeHooks(hooks.bindEvents, [eventHolder]);
}

Expand All @@ -1232,6 +1234,7 @@ Licensed under the MIT license.
eventHolder.unbind("mousemove", onMouseMove);
eventHolder.unbind("mouseleave", onMouseLeave);
eventHolder.unbind("click", onClick);
eventHolder.unbind("dblclick", onDblClick);

executeHooks(hooks.shutdown, [eventHolder]);
}
Expand Down Expand Up @@ -2766,6 +2769,10 @@ Licensed under the MIT license.
function (s) { return s["clickable"] != false; });
}

function onDblClick(e) {
triggerClickHoverEvent("plotdblclick", e,
function (s) { return s["clickable"] != false; });
}
// trigger click or hover event (they send the same parameters
// so we share their code)
function triggerClickHoverEvent(eventname, event, seriesFilter) {
Expand Down

0 comments on commit 1b3977d

Please sign in to comment.