]> git.0d.be Git - nanofun.git/blobdiff - nanofun.js
create pads from a template, then delete the template
[nanofun.git] / nanofun.js
index 34e1dcc2184a1f675f4092afac24778c9776cccf..3fd7203ae2a86a4c8bf013364d71b9258e72edc6 100644 (file)
@@ -333,11 +333,12 @@ var nanofun = function() {
   self.initUI = function() {
     var $nanopad = $('#nanopad');
     var $nanotouch = $('.nanotouch');
-    for (var i=1; i<16; i++) {
+    for (var i=0; i<16; i++) {
       var $new_touch = $nanotouch.clone();
       $new_touch.attr('data-touch', i);
       $new_touch.appendTo($nanopad);
     }
+    $nanotouch.remove(); /* remove template */
 
     $('.nanotouch input[type=file]').on('change', function(ev) {
       var sample_idx = parseInt($(this).parent().data('touch'));