matiasgali / guillotine

jQuery plugin to crop images within an area (fully responsive), allowing to drag (touch support), zoom and rotate.
http://guillotine.js.org
327 stars 100 forks source link

Problem with webkit rotate #35

Closed andrisgazdag closed 9 years ago

andrisgazdag commented 9 years ago

In Safari rotating images does not work. (Safari 8, OSX 10.10, latest jQuery, latest Guillotine) The problem lies in how guillotine applies the css rotate property. In guillotine.js I found in line 346:

this.$el.css({
                transform: "rotate(" + this.angle + "deg)",
            });

which is not working under webkit. Instead there should be:

this.$el.css({
                transform: "rotate(" + this.angle + "deg)",
                "-webkit-transform": "rotate(" + this.angle + "deg)",
                "-ms-transform": "rotate(" + this.angle + "deg)"
            });
matiasgali commented 9 years ago

jQuery's .css() should automatically add vendor prefixes when required for this case.

According to some fellows here it should work from jQuery 1.8 and on.

Double check the jQuery version being used and try disabling any other plugins, test Guillotine alone. You can also try running the demo on the same version of Safari.

Let me know if the issue persists.

matiasgali commented 9 years ago

Closing for inactivity.