Merge "Unimplement wgSVGMaxSize"

This commit is contained in:
jenkins-bot 2014-06-26 22:37:01 +00:00 committed by Gerrit Code Review
commit f3989cdc24

View file

@ -54,8 +54,7 @@ OO.mixinClass( ve.dm.MWImageNode, ve.dm.ResizableNode );
ve.dm.MWImageNode.prototype.syncScalableToType = function ( type ) {
var originalDimensions, dimensions,
scalable = this.getScalable(),
width = this.getAttribute( 'width' ),
height = this.getAttribute( 'height' );
width = this.getAttribute( 'width' );
// If no type is given, assume we are updating per current type
type = type || this.getAttribute( 'type' );
@ -91,20 +90,9 @@ ve.dm.MWImageNode.prototype.syncScalableToType = function ( type ) {
} else {
scalable.setEnforcedMax( false );
}
} else {
// Set max to svgMaxSize on the shortest side
if ( width < height ) {
dimensions = scalable.getDimensionsFromValue( {
'width': this.svgMaxSize
} );
} else {
dimensions = scalable.getDimensionsFromValue( {
'height': this.svgMaxSize
} );
}
scalable.setMaxDimensions( dimensions );
scalable.setEnforcedMax( true );
}
// TODO: Some day, when svgMaxSize works properly in MediaWiki
// we can add it back as max dimension consideration.
};
/**
* Respond to attribute change.