title: Fabricjs move object to layer
body: <p>I am trying to move items to a different layer (so I can order them)</p>
  
  <pre><code>for (var x = 0; x &lt; resp.Items.length; x++) {
      $('#inv' + resp.Items[x].Type).attr('src', '/public/items/universe/' + resp.Items[x].Type + '/' + resp.Items[x].Name + '.png');
      fabric.Image.fromURL('/public/items/universe/' + resp.Items[x].Type + '/' + resp.Items[x].Name + '.png', function(obj) {
          inventory.add(obj);
          obj.moveTo(obj.priority)
          obj.selectable = false;
          inventory.renderAll();
          console.log(inventory.getObjects().indexOf(obj), obj.priority)
      }, {
          id: resp.Items[x].Name,
          creator: resp.Items[x].Creator.Username,
          priority: resp.Items[x].Priority,
          category: resp.Items[x].Type
      });
  }
  </code></pre>
  
  <p>I am trying to use moveTo method with no success at all. the console.log call shows always 0, 1, 2, 3... instead of the moveTo index</p>
  
  <p>I get no errors and item.priority exists so... I am missing something I guess</p>