Rank: Newbie
Groups: Guest
Joined: 1/13/2011(UTC) Posts: 3
|
Hello.
I would like to add a button at the navigation (next to zoom) which when it is clicked it will rotate the current (selected) vObject 90degrees.
How can we do that with javascript, without needing to postback the page?
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 5/29/2010(UTC) Posts: 1,310
Thanks: 8 times Was thanked: 111 time(s) in 111 post(s)
|
Hello Marios, Here is the code snippet of function, which allows rotate selected VObjects in 90 degrees: Code:…
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);
…
|
Best regards, Dmitry Obukhov
Technical Support. Aurigma, Inc.
|
|
|
|
Rank: Newbie
Groups: Guest
Joined: 1/13/2011(UTC) Posts: 3
|
Thank you very much.
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?
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 5/29/2010(UTC) Posts: 1,310
Thanks: 8 times Was thanked: 111 time(s) in 111 post(s)
|
Hello Marios, Quote: 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. |
Best regards, Dmitry Obukhov
Technical Support. Aurigma, Inc.
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.