Here is the code snippet of function, which allows rotate selected VObjects in 90 degrees:
…
var phl = Sample.get_photoLabel();
var cv = phl.get_canvasViewer().get_canvas();
var cvo = cv.get_currentVObject();
var r = cvo.get_rectangle();
if (r.Angle == 0 )
r.Angle = 90;
cvo.set_rectangle(r);
…
I inserted the code, but when i click the button, i have to click into the card after so the text to be rotated. Is there any way to "refresh" the canvas?
I inserted the code, but when i click the button, i have to click into the card after so the text to be rotated. Is there any way to "refresh" the canvas?
As far as I understand, you need to select TextVObject to rotate it clicking the button. It should work so. We select object, which is become “current”, and rotate it. Unfortunately, there is no another way.