Jump to content

Is there a possibility to rotate the UniImage?


rdelphi

Recommended Posts

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?

Link to comment
Share on other sites

 

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?

Link to comment
Share on other sites

  • 4 months later...

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
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...