Jump to content

Recommended Posts

Posted

This may help you:

$(MainForm.UniImage1.el.dom).css({
        "-webkit-transform": "rotate(90deg)",
        "-moz-transform": "rotate(90deg)",
        "transform": "rotate(90deg)" 
    });
Posted

Hi,

 

 

Which edition and build are you using?

 

uniGUI Complete Trial Edition 1.0.2 Build 1450

 

 

 

This may help you:

$(MainForm.UniImage1.el.dom).css({
        "-webkit-transform": "rotate(90deg)",
        "-moz-transform": "rotate(90deg)",
        "transform": "rotate(90deg)" 
    });

 

Where do I use this code?

 

I want to click on the button to rotate the UniImage

 

 

Please see this code : https://gist.github.com/seungjin/131025

Is it possible to use?

How to use?

Posted

 

This may help you:

$(MainForm.UniImage1.el.dom).css({
        "-webkit-transform": "rotate(90deg)",
        "-moz-transform": "rotate(90deg)",
        "transform": "rotate(90deg)" 
    });

Your code will rotate all images

While I want the user to rotate the images

What are you suggesting for this?

  • 4 months later...
Posted

I would like to rotate the image 180 degrees when I click the Button the second time.

And 270 degrees when I click it the third time

And undo the rotation with the fourth click

Can you please help?

Posted

Hi Sherzod,

Yes I agree, the logic I can figure out

I do not know where to insert the variable in the JS code.

It works if I use 4 Buttons, but that is rather ugly

Posted

Just save it on the Form and with every click you update it from 90 to 180 and so on..then update the JS code above to reflect the value.

protected
  vDegrees: integer;

On the button click:
vDegrees := vDegrees + 90; -- you have to add some logic when it gets to 360
UniImage1
.JSInterface.JSCode(#1'.el.query("img")[0].style.transform="rotate('+ vDegrees +'deg)";');

  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...