when I rotate the ruler and then move the ruler, the ruler rotates back to its original position

Jun 10, 2022

Hi. In my project, when I rotate the ruler and then move the ruler, the ruler rotates back to its original position. I want the ruler to be dragged and dropped as it rotates. Please help. Thank you

5 Replies
Jose Tansengco

Hello,

It looks like the rotation of your ruler is controlled by Javascript. We don't provide support for Javascript, but an alternative solution is to make use of states to achieve the effect. What you'll want to do is to add multiple states to your object, with each state containing a rotated version of the ruler image. 

Here's a quick recording to verify that this method will allow learners to click and drag a rotated version of the image file: 

Note that it might take multiple states to achieve a nice sweeping effect for the rule.