how can i draw a shape with a button using kineticjs?
===

i'm begining to use canvas and kinetic, i try to draw a rect when click the button "add text", in the function i declare a var Text, add the var Text in the layer and add the layer to the stage, anybody can helpme?

   

 

    window.onload = function() {
        var stage = new Kinetic.Stage({
          container: "container",
          width: 578,
          height: 200
        });
        var shapesLayer = new Kinetic.Layer();

    document.getElementById("Draw_text").addEventListener("click", function () {
        var Text = new Kinetic.Text({
            x: 100,
            y: 100,
            text: "hi",
            draggable: "true"
        });

        shapesLayer.add(Text);
        stage.add(shapesLayer);
    }, false);

    <body onmousedown="return false;">
    <div id="container"></div>
      <div id="buttons">
      	  <button id="Draw_text">
          add text
      </button>
    </div>
  </body>