Improve JavaScript object formatting. see #21390.

git-svn-id: http://core.svn.wordpress.org/trunk@22143 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Daryl Koopersmith 2012-10-09 02:07:09 +00:00
parent 7788ddab90
commit 4c2f61c767

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
});
}
});