From 41c77a3357596c566d5b89283980e8d06f84c778 Mon Sep 17 00:00:00 2001 From: Julie Lala Date: Fri, 1 May 2015 02:14:59 -0400 Subject: save custom brushes --- js/ui/custom.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 js/ui/custom.js (limited to 'js/ui/custom.js') diff --git a/js/ui/custom.js b/js/ui/custom.js new file mode 100644 index 0000000..a758d48 --- /dev/null +++ b/js/ui/custom.js @@ -0,0 +1,24 @@ +var custom = (function(){ + + var exports = {} + + exports.clone = function (){ + var new_brush = brush.clone() + var rapper = document.createElement("div") + rapper.className = "custom" + new_brush.append(rapper) + custom_rapper.appendChild(rapper) + // store in localstorage? + rapper.addEventListener("click", function(){ + // load this brush + exports.load(new_brush) + }) + } + + exports.load = function(new_brush){ + brush.assign( new_brush ) + } + + return exports + +})() -- cgit v1.2.3-70-g09d2