Adding classes according to flipX, flipY settings and flipping using css