mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-25 14:56:20 +00:00
Merge "Initialize 'default' size properly in media edit dialog"
This commit is contained in:
commit
5f063f4e5d
|
@ -285,13 +285,12 @@ ve.dm.MWImageModel.prototype.getUpdatedAttributes = function () {
|
|||
origAttrs = this.getOriginalImageAttributes();
|
||||
|
||||
// Adjust default dimensions if size is set to default
|
||||
// FIXME modifying this.scalable shouldn't be done in a getter and shouldn't be needed (bug 66149)
|
||||
if ( this.scalable.isDefault() && this.scalable.getDefaultDimensions() ) {
|
||||
this.scalable.setCurrentDimensions( this.scalable.getDefaultDimensions() );
|
||||
currentDimensions = this.scalable.getDefaultDimensions();
|
||||
} else {
|
||||
currentDimensions = this.getCurrentDimensions();
|
||||
}
|
||||
|
||||
currentDimensions = this.getCurrentDimensions();
|
||||
|
||||
attrs = {
|
||||
'type': this.getType(),
|
||||
'width': currentDimensions.width,
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* @copyright 2011-2014 VisualEditor Team and others; see AUTHORS.txt
|
||||
* @license The MIT License (MIT); see LICENSE.txt
|
||||
*/
|
||||
/*global mw */
|
||||
|
||||
/**
|
||||
* Dialog for editing MediaWiki media objects.
|
||||
|
@ -304,9 +303,6 @@ ve.ui.MWMediaEditDialog.prototype.initialize = function () {
|
|||
this.$sizeWidgetElements
|
||||
] );
|
||||
|
||||
// Get wiki default thumbnail size
|
||||
this.defaultThumbSize = mw.config.get( 'wgVisualEditorConfig' ).defaultUserOptions.defaultthumbsize;
|
||||
|
||||
// Events
|
||||
this.positionCheckbox.connect( this, { 'change': 'onPositionCheckboxChange' } );
|
||||
this.borderCheckbox.connect( this, { 'change': 'onBorderCheckboxChange' } );
|
||||
|
|
Loading…
Reference in a new issue