mirror of
https://github.com/lalbornoz/roar.git
synced 2024-11-27 09:16:39 +00:00
25 lines
506 B
JavaScript
25 lines
506 B
JavaScript
|
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
|
||
|
|
||
|
})()
|