mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 00:30:44 +00:00
Default/custom switch size quickfix
Handling a bug where the placeholders weren't set to images that weren't set to default size. The switch to 'default' failed because there were no placeholders and data for default to go on. This is now fixed in this commit; if the image is non-default, the values are given to the media size widget from the config settings. Change-Id: I402b8d4de606c0939daa316408fcf5de2f0b2181
This commit is contained in:
parent
0d5021bf33
commit
0f51538272
|
@ -523,6 +523,17 @@ ve.ui.MWMediaEditDialog.prototype.setup = function ( data ) {
|
|||
'height': 0
|
||||
} );
|
||||
} else {
|
||||
// Set placeholders for the default bounding box
|
||||
if ( this.mediaNode.getAttribute( 'width' ) > this.mediaNode.getAttribute( 'height' ) ) {
|
||||
this.sizeWidget.setPlaceholderDimensions( {
|
||||
'width': this.defaultThumbSize,
|
||||
} );
|
||||
} else {
|
||||
this.sizeWidget.setPlaceholderDimensions( {
|
||||
'height': this.defaultThumbSize
|
||||
} );
|
||||
}
|
||||
|
||||
this.sizeSelectWidget.intializeSelection(
|
||||
this.sizeSelectWidget.getItemFromData( 'custom' )
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue