summaryrefslogtreecommitdiff
path: root/gui.js
diff options
context:
space:
mode:
authorCode WvS <code-wvs@quantentunnel.de>2015-02-27 12:56:13 +0100
committerCode WvS <code-wvs@quantentunnel.de>2015-02-27 12:56:13 +0100
commit3d4a49c84cd5b01384e12424b4c5f347bd13f7ff (patch)
tree3fc8fd6830cfe20258769de843253424b77ba6e1 /gui.js
parent3a24c17975d6125ac3cc59b3ea325e8f4d347bfd (diff)
downloadsnap-yow-3d4a49c84cd5b01384e12424b4c5f347bd13f7ff.tar.gz
snap-yow-3d4a49c84cd5b01384e12424b4c5f347bd13f7ff.zip
spritify markers
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);