diff --git a/dist/entry.js b/dist/entry.js index 9763677833..169196224c 100644 --- a/dist/entry.js +++ b/dist/entry.js @@ -9313,14 +9313,13 @@ Entry.Playground.prototype.clonePicture = function(a) { this.addPicture(a, !0); }; Entry.Playground.prototype.selectPicture = function(a) { - if (a) { - for (var b = this.object.pictures, c = 0, d = b.length;c < d;c++) { - var e = b[c]; - e.id === a.id ? e.view.addClass("entryPictureSelected") : e.view.removeClass("entryPictureSelected"); - } - b = Entry.container.selectPicture(a.id); - this.object.id === b && Entry.dispatchEvent("pictureSelected", a); + for (var b = this.object.pictures, c = 0, d = b.length;c < d;c++) { + var e = b[c]; + e.id === a.id ? e.view.addClass("entryPictureSelected") : e.view.removeClass("entryPictureSelected"); } + var f; + a && a.id && (f = Entry.container.selectPicture(a.id)); + this.object.id === f && Entry.dispatchEvent("pictureSelected", a); }; Entry.Playground.prototype.movePicture = function(a, b) { this.object.pictures.splice(b, 0, this.object.pictures.splice(a, 1)[0]); diff --git a/dist/entry.min.js b/dist/entry.min.js index e925df8edf..877cddec83 100644 --- a/dist/entry.min.js +++ b/dist/entry.min.js @@ -862,7 +862,7 @@ Entry.Playground.prototype.injectObject=function(a){if(!a)this.changeViewMode("c Entry.Playground.prototype.injectCode=function(){var a=this.object;Blockly.mainWorkspace.clear();Blockly.Xml.domToWorkspace(Blockly.mainWorkspace,a.script)};Entry.Playground.prototype.injectPicture=function(){var a=this.pictureListView_;if(a){for(;a.hasChildNodes();)a.removeChild(a.lastChild);if(this.object){for(var b=this.object.pictures,c=0,d=b.length;c