Functions / position
position
position( )

returns object with two properties: x and y - coordinates of jCanvaScript object on canvas.
position( )
return: object {x,y}
Code
<script type="text/javascript">	
	function start_1(idCanvas)	
	{
		var x=(0.5-Math.random())*100;
		var y=(0.5-Math.random())*100;
		jc('#myCircle_1')
			.translate(x,y);
		var point=jc('#myCircle_1').position();	
		jc('#coords_1')
			.string('x: '+point.x+', y: '+point.y);
	}
	function stop_1(idCanvas)
	{
		jc.clear();
		onload_1(idCanvas);
	}	
	function onload_1(idCanvas)
	{
		jc.start(idCanvas,true);
		jc.circle(100,120,50,true)
			.id('myCircle_1');
		jc.text('',10,10).id('coords_1');
	}
</script>
<canvas id="canvas_1" width="250px" height="265px"></canvas>
View