[papert commit] r118 - trunk/static

4 views
Skip to first unread message

codesite...@google.com

unread,
Jan 25, 2009, 4:03:03 PM1/25/09
to paper...@googlegroups.com
Author: thomas.figg
Date: Sun Jan 25 12:56:22 2009
New Revision: 118

Modified:
trunk/static/logo.js
trunk/static/turtle.js

Log:
fixing cs/clean mistake

Modified: trunk/static/logo.js
==============================================================================
--- trunk/static/logo.js (original)
+++ trunk/static/logo.js Sun Jan 25 12:56:22 2009
@@ -181,6 +181,7 @@
});

this.addTurtleCommand('clearscreen',0,['cs','clear']);
+ this.addTurtleCommand('clean',0,null);

this.addTurtleCommand('reset',0,null);

@@ -688,4 +689,4 @@
//alert("setting "+key+":"+value);
this.table[mkey] = value;
}
-}
\ No newline at end of file
+}

Modified: trunk/static/turtle.js
==============================================================================
--- trunk/static/turtle.js (original)
+++ trunk/static/turtle.js Sun Jan 25 12:56:22 2009
@@ -124,16 +124,21 @@
return this.angle / 180 * Math.PI;
}

-Turtle.prototype.clearscreen = function() {
+Turtle.prototype.clean = function() {
old = this.c.fillStyle
this.c.fillStyle = "rgb(255,255,255)";
this.c.fillRect(0,0,this.max_x,this.max_y);
this.c.fillStyle = old
}

+Turtle.prototype.clearscreen = function() {
+ this.clean();
+ this.home();
+}
+

Turtle.prototype.reset = function() {
- this.clearscreen();
+ this.clean();
this.setup();
}

@@ -216,6 +221,7 @@
DelayTurtle.prototype.right = function() {
this.addCommand(this.turtle.right,arguments)};
DelayTurtle.prototype.left = function() {
this.addCommand(this.turtle.left,arguments)};
DelayTurtle.prototype.reset = function() {
this.addCommand(this.turtle.reset,arguments)};
+DelayTurtle.prototype.clean = function() {
this.addCommand(this.turtle.clean,arguments)};
DelayTurtle.prototype.clearscreen = function() {
this.addCommand(this.turtle.clearscreen,arguments)};
DelayTurtle.prototype.penup = function() {
this.addCommand(this.turtle.penup,arguments)};
DelayTurtle.prototype.pendown = function() {
this.addCommand(this.turtle.pendown,arguments)};

Reply all
Reply to author
Forward
0 new messages