From c58e5b9a03ef8a147c6fdae86dc31ff7173f6613 Mon Sep 17 00:00:00 2001 From: Rolux Date: Thu, 4 Mar 2010 10:29:32 +0100 Subject: [PATCH] minor cleanup --- build/js/ox.js | 6 +++--- build/js/ox.ui.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/js/ox.js b/build/js/ox.js index ed0bf3d..7df4967 100644 --- a/build/js/ox.js +++ b/build/js/ox.js @@ -804,7 +804,7 @@ Encoding functions str = Ox.encodeUTF8(str); var len = str.length, c = Ox.canvas(Math.ceil((4 + len) / 3), 1), data; str = Ox.pad(Ox.encodeBase256(len), 4, Ox.char(0)) + str + - + Ox.repeat("\u00FF", (4 - len % 4) % 4); // simpler? Ox.pad()? + Ox.repeat("\u00FF", (4 - len % 4) % 4); // simpler? Ox.pad()? /* fixme: why does map not work here? c.data = $.map(c.data, function(v, i) { return i % 4 < 3 ? str.charCodeAt(i - parseInt(i / 4)) : 255; @@ -815,7 +815,7 @@ Encoding functions } c.context.putImageData(c.imageData, 0, 0); data = atob(c.canvas.toDataURL().split(",")[1]); - Ox.print("deflate", len, "->", data.length - 20); + //Ox.print("deflate", len, "->", data.length - 20); return data.substr(8, data.length - 20); } @@ -823,7 +823,7 @@ Encoding functions var image = new Image(); image.src = "data:image/png;base64," + btoa("\u0089PNG\r\n\u001A\n" + str + Ox.repeat("\u0000", 4) + "IEND\u00AEB`\u0082"); - while(!image.width) {} + while (!image.width) {} // wait for image data str = Ox.map(Ox.canvas(image).data, function(v, i) { return i % 4 < 3 ? Ox.char(v) : ""; }).join(""); diff --git a/build/js/ox.ui.js b/build/js/ox.ui.js index 18deb2c..cc3b9f1 100644 --- a/build/js/ox.ui.js +++ b/build/js/ox.ui.js @@ -1354,13 +1354,13 @@ requires function mousedownLayer() { that.$layer.stop().animate({ opacity: 0.5 - }, 100); + }, 50); } function mouseupLayer() { that.$layer.stop().animate({ opacity: 0 - }, 100); + }, 50); } function reset() {