Skip to content
This repository has been archived by the owner on Dec 25, 2018. It is now read-only.

Bubble image not positioned correctly on rotation #18

Open
zmandel opened this issue Jun 25, 2014 · 0 comments
Open

Bubble image not positioned correctly on rotation #18

zmandel opened this issue Jun 25, 2014 · 0 comments

Comments

@zmandel
Copy link

zmandel commented Jun 25, 2014

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant