We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8101fa7 commit a40f7b4Copy full SHA for a40f7b4
src/directives/parallax.js
@@ -17,12 +17,12 @@ directive('duParallax',
17
}
18
19
var translate3d = function(result){
20
- return 'translate3d(' + result.x + 'px, ' + result.y + 'px, 0)';
+ return 'translate3d(' + Math.round(result.x) + 'px, ' + Math.round(result.y) + 'px, 0)';
21
};
22
23
var rotate = function(result) {
24
if(!result.rotation) return '';
25
- return ' rotate(' + result.rotation + (angular.isNumber(result.rotation) ? 'deg' : '') + ')';
+ return ' rotate(' + (angular.isNumber(result.rotation) ? Math.round(result.rotation) + 'deg' : result.rotation) + ')';
26
27
28
var applyProperties = function(result, element) {
0 commit comments