jquery-ui-rotatable

In writing Herald, I ended up writing some code that is used to rotate the units on the battlefield. I eventually got off my lazy ass and released it as a jQuery UI plugin on github. So I’m announcing the release of jquery-ui-rotatable. If you use it, let me know – I’d love to see it in use around the place.

  • Pete Ingleby

    I’m developing a seating plan helper for teachers. I’ll post a link when it’s online. Each kid in the class is represented by a square div (currently containing an img generated in php from data the teacher uploads). I’m using draggable and rotatable to allow the teacher to put the kids where they want them on screen. Problem is, my php is much better than my javascript! I’m struggling with how to access the performRotation method in my $.ready() so that I can put each kid in the right place and right rotation to start off with (ie recall a saved state). I tried $.performRotation and $(‘#dividhere’).performRotation to no avail!

    • godswearhats

      Hi Pete,

      performRotation() is actually hidden deliberately so that you can’t access it (this was to avoid namespace collisions and it a pretty common practice.) However, you’re right that this is missing functionality. I’ve updated the code at github, so you should now be able to pass a starting angle like this:

      $(‘#target’).rotatable( { angle: 0.2 } ); // remember this is radians!

      Hope this helps,
      ~gwh

  • daniel

    Any chance rotatable will work with resizable without the controls becoming .. weird?
    (if you rotate 90 degrees and then resize, the resize will happen in a weird way)

    • godswearhats

      Yeah, that’s an annoying problem. I will take a look into it when I get some time (probably in July).

    • godswearhats

      I took at a look at it today and don’t see any simple way to fix. I’ll keep digging over time.

      • Alep Kurniaga

        Hi, I am currently using the libraries for rotatable and resizable and I am having some issues with the resizing after doing a rotation. Has there been a fix for this problem? I have the same problem as mentioned by Daniel. Thank you.

        • godswearhats

          I’ve not figured out a way to handle this. If you have any suggestions I’d be interested to hear them!

  • Belanie Addams

    Any idea why it’s not working for me here?
    http://virulina.com/sigil/sigil.html
    each character typed should be resizeable, draggable, and rotatable

  • noambarz

    Thanks for the plugin. Works really well. Enable/ disable doesn’t seem to work. Is there a known issue? Can you point me to a working demo?