Page 1 of 1

Image rotation on widget range are -180 and +179. To working, we have to add extra step.

Posted: 30 May 2019 10:02
by natong
Screenshot_2019-05-30-16-39-49-634.png
Screenshot_2019-05-30-16-39-49-634.png (167.15 KiB) Viewed 10882 times
I am testing image rotation on widget.
Example the weather api report wind direction as 0 to 360 degree.

To working with AutoMagic, we have to add extra step:

Code: Select all

if ( degree - 179 >= 1 )
{
     degree = ( 360 - degree ) * -1;
}
Could you please adjust maximum value to -360 / +360 ?
or -180 / +180 ?

Re: Image rotation on widget range are -180 and +179. To working, we have to add extra step.

Posted: 30 May 2019 20:12
by Martin
Hi,

I assume that you are using function setWidgetElementProperty to change the rotation. This method should not limit the range of the rotation to [-180,179]. The limitation is only enforced in the UI to keep the range of the slider as small as possible. A larger range would make it more difficult to place the slider accurately.

Regards,
Martin

Re: Image rotation on widget range are -180 and +179. To working, we have to add extra step.

Posted: 31 May 2019 06:33
by natong
oh! I forgot to test the limit with setWidgetElementProperty. Thank you very much.

Updated:
Tested with setWidgetElementProperty work very well without extra formula.