title: using fabricjs to get selected group on canvas and then change text
body: <p>I am trying to add curved text on my canvas . This Example works Al right . i am trying to add curved text whenever user type text in text-area it should check if any one canvas object is selected if selected then text for the selected object should get change otherwise new object should be added on canvas .</p>
  
  <p>check the fiddle , <a href="http://jsfiddle.net/NHs8t/7/" rel="nofollow">http://jsfiddle.net/NHs8t/7/</a></p>
  
  <p>Below code i have written to check if any object on canvas is selected or not ?? but canvas.getActiveGroup() is not working any help ???</p>
  
  <p>Jquery Code::</p>
  
  <pre><code>$('.text').change(function() {
  
          var act = canvas.getActiveGroup();
  
              var obj = canvas.getActiveObject();
           if(!obj)
           {
              console.log('object not Selected');
           }else
           {
              console.log('Object  selected');
           }
           if (!canvas.getActiveGroup()) 
           {
              console.log('if part executed--object not selected');
  
              curvedText[cur] = new CurvedText(canvas, {});
              curvedText[cur].center();
              curvedText[cur].setText($(this).val());
              cur++;
  
  
          } else {
              console.log('Else part executed-object selected');
              act.setText($(this).val());
              $("&lt;li id='item_li" + i + "' class='item_list'&gt; " + $(this).val() + " &lt;div class='updown' style='text-align:right;'&gt; [ &lt;a id='down_link" + i + "' class='down'&gt;Down&lt;/a&gt; ] [&lt;a id='close_link" + i + "' class='close'&gt;Close&lt;/a&gt;] &lt;/div&gt;&lt;/li&gt;").appendTo($("#items_list"));
          }
  
      });
  </code></pre>