summaryrefslogtreecommitdiff
path: root/public/assets/js/vendor/util.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2017-12-22 07:11:26 +0100
committerJules Laplace <julescarbon@gmail.com>2017-12-22 07:11:26 +0100
commitfa4ed0f3b1ce5decfc6ee59d38e63e78a7793de4 (patch)
tree74658c754cbdff432aa8dc8b4f3521c993993c45 /public/assets/js/vendor/util.js
parent1a67f6f262364ee4fed0c1538ef2f41d772bf1b1 (diff)
new keyword form
Diffstat (limited to 'public/assets/js/vendor/util.js')
-rw-r--r--public/assets/js/vendor/util.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/public/assets/js/vendor/util.js b/public/assets/js/vendor/util.js
index b08a914..cab7a6c 100644
--- a/public/assets/js/vendor/util.js
+++ b/public/assets/js/vendor/util.js
@@ -85,7 +85,7 @@ function rgbpixel(d,x,y){
function fit(d,x,y){ rgbpixel(d,x*actual_w/w,y*actual_h/h) }
function step(a, b){
- return (b >= a) + 0
+ return (b >= a) + 0
// ^^ bool -> int
}
@@ -225,20 +225,20 @@ if (!Function.prototype.bind) {
var vendors = ['ms', 'moz', 'webkit', 'o'];
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame'];
- window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame']
+ window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame']
|| window[vendors[x]+'CancelRequestAnimationFrame'];
}
-
+
if (!window.requestAnimationFrame)
window.requestAnimationFrame = function(callback, element) {
var currTime = new Date().getTime();
var timeToCall = Math.max(0, 16 - (currTime - lastTime));
- var id = window.setTimeout(function() { callback(currTime + timeToCall); },
+ var id = window.setTimeout(function() { callback(currTime + timeToCall); },
timeToCall);
lastTime = currTime + timeToCall;
return id;
};
-
+
if (!window.cancelAnimationFrame)
window.cancelAnimationFrame = function(id) {
clearTimeout(id);