Stack Exchange
OriginX and OriginY makes object unselectable
In this example on the canvas we have a selected rectangle. We have a selector of OriginX and OriginY, in the upper part of the canvas. When we select a checkbox, the center of rotation of the object changes.
But when changing, the object is not rendered correctly, even when doing obj.setCoords.
The Fiddle
var canvas = new fabric.Canvas('canvas');
var rect1 = new fabric.Rect({
  width: 100,
  height: 100,
  left: 200,
  top: 200,
  angle: 0,
  fill: 'rgba(0,0,255,1)',
  originX: 'center',
  originY: 'center'
 });
 canvas.add(rect1);
 canvas.setActiveObject(rect1);
 $("#checkboxOneInput").on('change', function(){
   if(canvas.getActiveObject()){
         var obj = canvas.getActiveObject();
     obj.set('originX', 'left');
     obj.set('originY', 'top');
     obj.setCoords();
     canvas.renderAll();
  }
});
$("#checkboxTwoInput").on('change', function(){
  if(canvas.getActiveObject()){
        var obj = canvas.getActiveObject();
     obj.set('originX', 'center');
     obj.set('originY', 'top');
     obj.setCoords();
     canvas.renderAll();
  }
 });
 $("#checkboxThreeInput").on('change', function(){
  if(canvas.getActiveObject()){
        var obj = canvas.getActiveObject();
    obj.set('originX', 'rigth');
    obj.set('originY', 'top');
    obj.setCoords();
    canvas.renderAll();
  }
 });
$("#checkboxFourInput").on('change', function(){
   if(canvas.getActiveObject()){
        var obj = canvas.getActiveObject();
     obj.set('originX', 'left');
     obj.set('originY', 'center');
     obj.setCoords();
     canvas.renderAll();
   }
  });
  $("#checkboxFiveInput").on('change', function(){
   if(canvas.getActiveObject()){
         var obj = canvas.getActiveObject();
     obj.set('originX', 'center');
     obj.set('originY', 'center');
     obj.setCoords();
     canvas.renderAll();
    }
   });
  $("#checkboxSixInput").on('change', function(){
     if(canvas.getActiveObject()){
        var obj = canvas.getActiveObject();
        obj.set('originX', 'right');
        obj.set('originY', 'center');
        obj.setCoords();
        canvas.renderAll();
     }
   });
   $("#checkboxSevenInput").on('change', function(){
      if(canvas.getActiveObject()){
        var obj = canvas.getActiveObject();
        obj.set('originX', 'left');
        obj.set('originY', 'bottom');
        obj.setCoords();
        canvas.renderAll();
      }
   });
   $("#checkboxEightInput").on('change', function(){
      if(canvas.getActiveObject()){
         var obj = canvas.getActiveObject();
         obj.set('originX', 'center');
         obj.set('originY', 'bototm');
         obj.setCoords();
         canvas.renderAll();
      }
     });
     $("#checkboxNineInput").on('change', function(){   
       if(canvas.getActiveObject()){
         var obj = canvas.getActiveObject();
         obj.set('originX', 'right');
         obj.set('originY', 'bottom');
         obj.setCoords();
         canvas.renderAll();
       }
     });


center of rotation of the object doesnt depend upon originX and originY, for more info on origin check

Now I'm confused then.
I had a functionality in which I changed the "rotation point" to the scaling handles

Hey pedro, about originX and originY not working with setCoords, i think you found a bug, could you report it to fabric.js issue tracker on github.com?

I opened the incidence but I closed it again, thinking it was not important

@AndreaBogazzi, controls changing, only we need to set left and top for drawing, bdw dirty:true also didnt work. Fiddle

Please add an answer as answer and not by editing the question :)

Ok, thanks for the tip. Changed

Okay, from now on I will not do this, Thank you

It was an error found in version 2.0.0 of fabricjs, change to version
2.0.1 of fabricjs to solve the problem
