Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
이슈 #1942 수정과 겹침
  • Loading branch information
kimorkim committed Feb 5, 2016
1 parent ee77e1c commit 7631b2a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
13 changes: 6 additions & 7 deletions dist/entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down
2 changes: 1 addition & 1 deletion dist/entry.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/playground.js
Original file line number Diff line number Diff line change
Expand Up @@ -987,9 +987,6 @@ Entry.Playground.prototype.clonePicture = function(pictureId) {
* @param {picture}
*/
Entry.Playground.prototype.selectPicture = function(picture) {
if(!picture) {
return;
}
var pictures = this.object.pictures;
for (var i = 0, len=pictures.length; i<len; i++) {
var target = pictures[i];
Expand All @@ -999,7 +996,10 @@ Entry.Playground.prototype.selectPicture = function(picture) {
target.view.removeClass('entryPictureSelected');
}

var objectId_ = Entry.container.selectPicture(picture.id);
var objectId_;
if(picture && picture.id) {
objectId_ = Entry.container.selectPicture(picture.id);
}

if( this.object.id === objectId_) {
Entry.dispatchEvent('pictureSelected', picture);
Expand Down

0 comments on commit 7631b2a

Please sign in to comment.