This repository has been archived by the owner. It is now read-only.
Bubble image not positioned correctly on rotation #18
Comments
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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'
});
}
The text was updated successfully, but these errors were encountered: