flot/flot — pull request #31 by campbell (2011-12-02 00:28:22+00:00)
Title: triggerClickHoverEvent should pass the original event through

There currently is no way to get information about whether the shift, meta or command keys were pressed when a `plotclick` event is triggered. This is because the original event object is not used when triggering the new event.

The `triggerClickHoverEvent` function triggers a new event by calling `jQuery.trigger()` with a string (e.g. 'plotclick') instead of the event object. Because the original event is not being used, we lose all information about the event (eg. which modifier keys were pressed).

This patch uses the original event object but replaces the TYPE attribute with the new event name.

event.type = eventname;
placeholder.trigger(event, [ pos, item ]);