google-code-export / leonardosketch

Automatically exported from code.google.com/p/leonardosketch
1 stars 0 forks source link

method setRadius() on shape is not defined #83

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create a circle
2. call method setRadius on it
3. add the circle into group

What is the expected output? What do you see instead?
expected output is to see the circle. instead, i see empty canvas

What version of the product are you using? On what operating system?
amino 1.0b1, google chrome 12.0.742.100, widnows vista business sp2

Please provide any additional information below.
error from google chrome console:
n = undefined
01-amino.html:20Uncaught TypeError: Object #<Node> has no method 'setRadius'

the code:
  <script>
    var r = new Runner();
    r.setCanvas(document.getElementById("myCanvas"));
    r.setBackground("white");

    var all = new Group();
    r.setRoot(all);

    var cir = new Circle();
    //cir.set(300, 150, 30);
    cir.setX(300);
    cir.setY(150);
    cir.setRadius(30);
    cir.setFill("red");
    all.add(cir);

    r.start();
  </script>

it's the code from amino tutorial. the set(w, h, r) method works fine though.

Original issue reported on code.google.com by g0dd...@googlemail.com on 20 Jun 2011 at 9:07

GoogleCodeExporter commented 9 years ago
i found out that this method was probably in som earlier version of amino js. 
therefore it's enough to fix it in the amino tutorial on goamino.org

Original comment by g0dd...@googlemail.com on 21 Jun 2011 at 9:34

GoogleCodeExporter commented 9 years ago
i actually implemented this method now, it's a handy one.

Original comment by g0dd...@googlemail.com on 23 Jun 2011 at 8:19

GoogleCodeExporter commented 9 years ago

Original comment by g0dd...@googlemail.com on 24 Jun 2011 at 6:38

GoogleCodeExporter commented 9 years ago

Original comment by g0dd...@googlemail.com on 24 Jun 2011 at 6:38

GoogleCodeExporter commented 9 years ago
i verified the solution by myself, but it'd be nice if someone else can confirm 
it too.

Original comment by g0dd...@googlemail.com on 24 Jun 2011 at 6:40