summaryrefslogtreecommitdiff
path: root/gui.js
diff options
context:
space:
mode:
Diffstat (limited to 'gui.js')
-rw-r--r--gui.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/gui.js b/gui.js
index 75220b3..a8fb59a 100644
--- a/gui.js
+++ b/gui.js
@@ -211,6 +211,7 @@ IDE_Morph.prototype.init = function (isAutoFill) {
this.serializer = new SnapSerializer();
this.globalVariables = new VariableFrame();
+
this.currentSprite = new SpriteMorph(this.globalVariables);
this.sprites = new List([this.currentSprite]);
this.currentCategory = 'motion';
@@ -2808,6 +2809,13 @@ IDE_Morph.prototype.newProject = function () {
location.hash = '';
}
this.globalVariables = new VariableFrame();
+
+ // recreate all Sprite markers (Snap-YOW)
+ if (window.map.hasLayer(window.spriteGroup)) {
+ window.map.removeLayer(window.spriteGroup);
+ }
+ window.spriteGroup = L.layerGroup().addTo(window.map);
+
this.currentSprite = new SpriteMorph(this.globalVariables);
this.sprites = new List([this.currentSprite]);
StageMorph.prototype.dimensions = new Point(480, 360);
@@ -3605,7 +3613,7 @@ IDE_Morph.prototype.userSetBlocksScale = function () {
action;
scrpt = new CommandBlockMorph();
- scrpt.color = SpriteMorph.prototype.blockColor.motion;
+ scrpt.color = SpriteMorph.prototype.blockColor.map;
scrpt.setSpec(localize('build'));
blck = new CommandBlockMorph();
blck.color = SpriteMorph.prototype.blockColor.sound;