Improve JavaScript object formatting. see #21390.

git-svn-id: https://develop.svn.wordpress.org/trunk@22143 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Daryl Koopersmith 2012-10-09 02:07:09 +00:00
parent adbb1b623a
commit ed281a6f6a

View File

@ -507,15 +507,22 @@
var size = _.pick( this.fit(), 'top', 'left', 'width', 'height' );
this.$el.addClass('fit');
this.$('.thumbnail').css( size );
this.$('.thumbnail img').css( _.extend( size, { top: 0, left: 0 } ) );
this.$('.thumbnail img').css( _.extend( size, {
top: 0,
left: 0
} ) );
},
expand: function() {
var size = _.pick( this.crop(), 'top', 'left', 'width', 'height' );
this.$el.removeClass('fit');
this.$('.thumbnail img').css( size );
this.$('.thumbnail').css({ top: 0, left: 0, width: 199, height: 199 });
this.$('.thumbnail').css({
top: 0,
left: 0,
width: 199,
height: 199
});
}
});