From 01596205fbe968a66b243b676e86da7c8e3ab710 Mon Sep 17 00:00:00 2001 From: Moriel Schottlender Date: Thu, 26 Jun 2014 15:40:20 -0400 Subject: [PATCH] Unimplement wgSVGMaxSize Because it doesn't work in MW. Bug: 66865 Change-Id: Idad2352bee32cbf10c80a757c59e518abaa342de --- modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js b/modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js index b8f4317cc9..ba316d071c 100644 --- a/modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js +++ b/modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js @@ -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.