diff options
| author | Code WvS <code-wvs@quantentunnel.de> | 2015-02-27 12:56:13 +0100 |
|---|---|---|
| committer | Code WvS <code-wvs@quantentunnel.de> | 2015-02-27 12:56:13 +0100 |
| commit | 3d4a49c84cd5b01384e12424b4c5f347bd13f7ff (patch) | |
| tree | 3fc8fd6830cfe20258769de843253424b77ba6e1 /gui.js | |
| parent | 3a24c17975d6125ac3cc59b3ea325e8f4d347bfd (diff) | |
| download | snap-yow-3d4a49c84cd5b01384e12424b4c5f347bd13f7ff.tar.gz snap-yow-3d4a49c84cd5b01384e12424b4c5f347bd13f7ff.zip | |
spritify markers
Diffstat (limited to 'gui.js')
| -rw-r--r-- | gui.js | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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); |
