summaryrefslogtreecommitdiff
path: root/gui.js
diff options
context:
space:
mode:
Diffstat (limited to 'gui.js')
-rw-r--r--gui.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/gui.js b/gui.js
index 7fb48ac..875a3d2 100644
--- a/gui.js
+++ b/gui.js
@@ -211,6 +211,10 @@ IDE_Morph.prototype.init = function (isAutoFill) {
this.serializer = new SnapSerializer();
this.globalVariables = new VariableFrame();
+
+ // recreate all Sprite markers (Snap-YOW)
+ window.spriteGroup = L.layerGroup().addTo(window.map);
+
this.currentSprite = new SpriteMorph(this.globalVariables);
this.sprites = new List([this.currentSprite]);
this.currentCategory = 'map';
@@ -2797,6 +2801,11 @@ IDE_Morph.prototype.newProject = function () {
location.hash = '';
}
this.globalVariables = new VariableFrame();
+
+ // recreate all Sprite markers (Snap-YOW)
+ 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);