Is this possible to generate a new Zabbix event from a Ruby script? I was suggested to use [zabbix\_sender](http://www.zabbix.com/documentation/1.8/manpages/zabbix_sender) script, but I couldn't find any example.

Also, I couldn't find any API related to the [events](http://www.zabbix.com/documentation/1.8/api/event) creation.
['https://Stackoverflow.com/questions/11287899', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/398309/']
Thanks, @Kontiki - this is the solution that finally fixed things for me:

```
if("touchmove" == e.type)
{

    let r = canvas.getBoundingClientRect();
    currX = e.touches[0].clientX - r.left;
    currY = e.touches[0].clientY - r.top;
}
else
{
    currX = e.offsetX;
    currY = e.offsetY;
}

```
Was having similar issue on binding event-handler using jQuery's `.on` function on `canvas` element (Don't know the reason). 

I resolved it by binding event-handler using `addEventListener`. The `event` object in the handler has offsetX and offsetY defined with proper values.

Hope it helps...