grumble.js icon indicating copy to clipboard operation
grumble.js copied to clipboard

Bubble image not positioned correctly on rotation

Open zmandel opened this issue 10 years ago • 0 comments

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' }); }

zmandel avatar Jun 25 '14 18:06 zmandel