Merge "Initialize 'default' size properly in media edit dialog"

This commit is contained in:
jenkins-bot 2014-06-10 18:41:46 +00:00 committed by Gerrit Code Review
commit 5f063f4e5d
2 changed files with 3 additions and 8 deletions

View file

@ -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,

View file

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