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:
parent
7788ddab90
commit
4c2f61c767
|
@ -507,15 +507,22 @@
|
||||||
var size = _.pick( this.fit(), 'top', 'left', 'width', 'height' );
|
var size = _.pick( this.fit(), 'top', 'left', 'width', 'height' );
|
||||||
this.$el.addClass('fit');
|
this.$el.addClass('fit');
|
||||||
this.$('.thumbnail').css( size );
|
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() {
|
expand: function() {
|
||||||
var size = _.pick( this.crop(), 'top', 'left', 'width', 'height' );
|
var size = _.pick( this.crop(), 'top', 'left', 'width', 'height' );
|
||||||
this.$el.removeClass('fit');
|
this.$el.removeClass('fit');
|
||||||
this.$('.thumbnail img').css( size );
|
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
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue