HTML5 Canvas 3D WebGL (TM) javaScript Library

Element Coordinates Properties of transition - Info

Short Description: Coordinates of associated HTML element

Signature:   a.x

After creation of a transition object a, the properties a.x and a.y contain the left and top coordinates in absolute pixels of the associated HTML element. a.w and a.h contain the width and the height.

It is very useful to read them and use them in expressions calculation parameters of the other methods. Examples below use the expression a.w/2 and a.h to resize the image to half the width of the element and to keep its height. The second example demponstrates giving a point relative to the position on the element.


var"testimg"); a.resize(a.w/2,a.h).start(); RUN
var"testimg");,a.y+1000,0).start(); RUN

WebGL™ is a trademark of the Khronos Group Inc.

Next Page:transition.Motion Start - Coordinates of motion start point
Previous Page: Info