Skip to content
Chris Hafey edited this page May 6, 2014 · 2 revisions

The pageToPixel api call is used to convert page coordinates to pixel coordinates. Page coordinates are often supplied in javascript events but most logic deals with the pixel coordinate system. This API converts from one to the other

function pageToPixel(element, pageX, pageY);

Parameters:

  • element - the DOM element with the enabled image
  • pageX - the x value in the page coordinate system
  • pageX - the y value in the page coordinate system

Returns: Object with the following properties

  • x - The corresponding x value in the pixel coordinate system
  • y - The corresponding y value in the pixel coordinate system