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/']
The correct answer based on the comments in the suggested answer:

```
e.offsetX = e.touches[0].pageX - e.touches[0].target.offsetLeft;     
e.offsetY = e.touches[0].pageY - e.touches[0].target.offsetTop;

```

This ignores any transformations such as rotations or scaling. Also be sure to check if there are any touches.
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...