grumble.js
grumble.js copied to clipboard
Bubble image not positioned correctly on rotation
Hi, under certain situations, the rotation is not centered correctly, might be because Im using the library from a chrome extension. My fix was to add -webkit-transform-origin on cssRotate:
cssRotate: function () { this.bubble.css({ '-moz-transform': 'rotate(' + this.rotateDeg + 'deg)', '-webkit-transform': 'rotate(' + this.rotateDeg + 'deg)', '-o-transform': 'rotate(' + this.rotateDeg + 'deg)', 'transform': 'rotate(' + this.rotateDeg + 'deg)', '-webkit-transform-origin-x': Math.floor(this.css.width/2)+ 'px', '-webkit-transform-origin-y': Math.floor(this.css.height / 2) + 'px' }); }