method to reposition wtText object via javascript
Status: Alpha
Brought to you by:
francium
Not sure if this is the proper way to move a wtText object once it has been created, but I couldn't see any other easy way to do it.
(added to wt_vector.js)
New function for the wtText prototype:
/**
Sets the x,y location of the text
@param {Number,Number} x,y The x and y location
*/
wtText.prototype.setXY = function(_x,_y)
{
if (isMSIE())
{
this.get("divNode").get("style").left = _x;
this.get("divNode").get("style").top = _y;
}
else
{
$_(this).setAttribute("x", _x);
$_(this).setAttribute("y", _y);
}
}