title: Toggle angle to move text to original position in fabricjs
body: <p>In <code>fabricjs</code>, <code>onclick</code> of button I'm setting some angle to flip the text. I want to make it toggle on next click text should come back to original. In below code if part works well how should I toggle it back?</p>
  
  <p><a href="http://jsfiddle.net/vnzhq/3/" rel="nofollow">fiddle</a>  </p>
  
  <p>JQuery code:</p>
  
  <pre><code> $('#font_flipx').click(function() {
  
      if(flipx==0)
      {
          console.log('flipx=0');
      canvas.getActiveObject().set("angle", "180").set('flipX', true);
      flipx=1;
      }
      else
      {
  
      console.log('flipx=1');
      canvas.getActiveObject().set("angle", "180").set('flipX', true);
      flipx=0;
      }
  
      canvas.renderAll();
  
  
  });
  </code></pre>