Skip to content

Commit

Permalink
fixes #15
Browse files Browse the repository at this point in the history
Thanks @bropp for the heads up
  • Loading branch information
stakach committed Oct 22, 2014
1 parent b3c3658 commit 6a72125
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions orbicular.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,16 @@
// Constants here reduce memory requirements of each circle
var $window = angular.element(windowRef),

// Cache event strings
// Cache event strings
resizeEvents = 'orientationchange resize',

// Set the rotation of the square
// Set the rotation of the square
updateProgress = function (circles, fix, pos) {
// If total is 0 or negative it can lead to Infinity or NaN values
if (!isFinite(pos)) {
pos = 0;
}

circles.css({
'-webkit-transform': 'rotate(' + pos + 'deg)',
'-moz-transform': 'rotate(' + pos + 'deg)',
Expand Down Expand Up @@ -87,7 +92,7 @@
var circles = [],
fix,

// Width must be an even number of pixels for the effect to work.
// Width must be an even number of pixels for the effect to work.
setWidth = function () {
var width = element.prop('offsetWidth');
element.css('font-size', width - (width % 2) + 'px');
Expand Down

0 comments on commit 6a72125

Please sign in to comment.