FreeRDP / FreeRDP-WebConnect

A gateway for seamless access to your RDP-Sessions in any HTML5-compliant browser
519 stars 1.62k forks source link

Wrong mouse positioning when canvas is positioned #8

Closed doosterkamp closed 10 years ago

doosterkamp commented 12 years ago

Hi Fritz ...

There's a small bug in the JS source, that sends out the wrong mouse coordinates when moving over the canvas when the canvas isn't positioned in the left upper corner.

You use the evt.page.x and evt.page.y properties to determine the mouse position, but this returnes the mouse position within the screen, not the canvas .. To get the correct relative position I changed these to evt.event.layerX and evt.event.layerY and now the positioning is correct ...