Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
xmarios  
#1 Posted : Monday, February 14, 2011 5:46:01 PM(UTC)
xmarios

Rank: Newbie

Groups: Member
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?

Dmitry.Obukhov  
#2 Posted : Tuesday, February 15, 2011 3:01:25 AM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
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.

xmarios  
#3 Posted : Wednesday, February 16, 2011 5:03:57 AM(UTC)
xmarios

Rank: Newbie

Groups: Member
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?

Dmitry.Obukhov  
#4 Posted : Thursday, February 17, 2011 2:55:56 AM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
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.

Users browsing this topic
Guest
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.