summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2014-07-17 10:59:13 +0200
committerjmoenig <jens@moenig.org>2014-07-17 10:59:13 +0200
commit5decf8a0e0433005c88621a87cbc6dad8634e11a (patch)
treeb94d666c7d91cd1f86a4ed4bac5cf989d7820cbf
parentc11e4c7c6d67a3882d0bbb36cb039d807fa49acd (diff)
downloadsnap-5decf8a0e0433005c88621a87cbc6dad8634e11a.tar.gz
snap-5decf8a0e0433005c88621a87cbc6dad8634e11a.zip
minor format tweaks to "Screenshot" feature
-rw-r--r--blocks.js2
-rwxr-xr-xhistory.txt1
-rw-r--r--objects.js10
3 files changed, 6 insertions, 7 deletions
diff --git a/blocks.js b/blocks.js
index e936c2c..b45f7e6 100644
--- a/blocks.js
+++ b/blocks.js
@@ -155,7 +155,7 @@ DialogBoxMorph, BlockInputFragmentMorph, PrototypeHatBlockMorph, Costume*/
// Global stuff ////////////////////////////////////////////////////////
-modules.blocks = '2014-July-11';
+modules.blocks = '2014-July-14';
var SyntaxElementMorph;
diff --git a/history.txt b/history.txt
index 8cc4e23..da678a1 100755
--- a/history.txt
+++ b/history.txt
@@ -2202,3 +2202,4 @@ ______
------
* new translation into Bangla (Bengali)!!! Yay, thanks, Mokter!!
* Lists: make internal list ops iterative (instead of recursive), thanks, Brian!
+* Objects, Blocks: new feature (hidden in dev mode): Save screenshot, thanks, Viral!
diff --git a/objects.js b/objects.js
index 20f1434..83a9966 100644
--- a/objects.js
+++ b/objects.js
@@ -125,7 +125,7 @@ PrototypeHatBlockMorph*/
// Global stuff ////////////////////////////////////////////////////////
-modules.objects = '2014-July-11';
+modules.objects = '2014-July-14';
var SpriteMorph;
var StageMorph;
@@ -1325,8 +1325,6 @@ SpriteMorph.prototype.init = function (globals) {
this.changed();
this.drawNew();
this.changed();
-
- this.screenshotNames = {}; // Keeps track of stage image names
};
// SpriteMorph duplicating (fullCopy)
@@ -4095,7 +4093,7 @@ SpriteMorph.prototype.newCostumeName = function (name) {
p = null,
costume = null;
- for (i = 1; i <= this.costumes.length(); i++) {
+ for (i = 1; i <= this.costumes.length(); i += 1) {
costume = this.costumes.at(i);
if (costume !== null) {
if (costume.name === name) {
@@ -4115,7 +4113,7 @@ SpriteMorph.prototype.newCostumeName = function (name) {
lastIndex += 1;
return name + '(' + lastIndex + ')'; // New index with a +1
}
- return name + '(2)'; // No indexing has started so start it off with a (1)
+ return name + '(2)'; // start off indexing with (1)
}
return name;
};
@@ -4130,7 +4128,7 @@ SpriteMorph.prototype.doScreenshot = function (imgSource, data) {
}
if (imgSource[0] === "pen trails") {
canvas = stage.trailsCanvas;
- costume = new Costume(canvas, data).copy(); // Copy is required to prevent mutation
+ costume = new Costume(canvas, data).copy(); // prevent mutation
} else if (imgSource[0] === "stage image") {
canvas = stage.fullImageClassic();
costume = new Costume(canvas, data);