diff options
Diffstat (limited to 'gui.js')
| -rw-r--r-- | gui.js | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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; |
