From 189182b77c57e662494baf13369ef221c86dc7f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Tue, 26 Apr 2011 15:16:05 +0100 Subject: [PATCH] Rename loop function to frame. --- src/util/PaperScript.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/util/PaperScript.js b/src/util/PaperScript.js index 1a5ed75e..e998e09d 100644 --- a/src/util/PaperScript.js +++ b/src/util/PaperScript.js @@ -147,14 +147,14 @@ var PaperScript = new function() { try { var onFrame = eval('onFrame'); if (onFrame) { - function loop() { + function frame() { // Request next frame already - Event.requestAnimationFrame(loop, doc && doc.canvas); + Event.requestAnimationFrame(frame, doc && doc.canvas); onFrame(); // Automatically redraw document each frame. doc && doc.redraw(); } - Event.requestAnimationFrame(loop, doc && doc.canvas); + Event.requestAnimationFrame(frame, doc && doc.canvas); } } catch (e) { } @@ -167,8 +167,8 @@ var PaperScript = new function() { //#ifdef BROWSER // Code borrowed from Coffee Script: function request(url) { - var xhr = new (window.ActiveXObject - || XMLHttpRequest)('Microsoft.XMLHTTP'); + var xhr = new (window.ActiveXObject || XMLHttpRequest)( + 'Microsoft.XMLHTTP'); xhr.open('GET', url, true); if ('overrideMimeType' in xhr) { xhr.overrideMimeType('text/plain');