diff --git a/foozy.html b/foozy.html index fa10130..97bafdc 100644 --- a/foozy.html +++ b/foozy.html @@ -27,20 +27,10 @@ return false; }); - $("#sort_hue").click(function() { - lol.displayHue(); - return false; - }); - - $("#sort_sat").click(function() { - lol.displaySat(); - return false; - }); - - $("#sort_val").click(function() { - lol.displayBright(); - return false; - }); + $("#sort_reset").click( function() { lol.displayImg(); return false; }); + $("#sort_hue").click( function() { lol.displayHue(); return false; }); + $("#sort_sat").click( function() { lol.displaySat(); return false; }); + $("#sort_val").click( function() { lol.displayBright(); return false; }); }); @@ -79,6 +69,7 @@
+ Reset Sort by Hue Saturation Brightness diff --git a/js/franz.js b/js/franz.js index 6537859..282adf5 100644 --- a/js/franz.js +++ b/js/franz.js @@ -46,7 +46,7 @@ var franz = function(franzProps) { var that = this; franz.util.loadEvent(function() { document.body.appendChild(that.canvas); - that.draw(); + typeof that.canvas_id !== 'undefined' ? that.draw(that.canvas_id) : that.draw(); if(typeof franzProps.callback !== "undefined" && typeof franzProps.callback === "function") franzProps.callback(); }); } else { @@ -83,7 +83,6 @@ franz.prototype = { rgba: [], hsb: [], hsl: [], - origIndex: [], extra_canvas: null, extra_ctx: null, @@ -94,7 +93,7 @@ franz.prototype = { this.extra_canvas = document.getElementById(different_canvas); this.extra_ctx = this.extra_canvas.getContext('2d'); } - + var working = this; working.img = new Image(); working.img.onload = function() { @@ -108,7 +107,7 @@ franz.prototype = { /* If you're looking for the non-