From dc0c7511007ac36e4bf970a03287a2263b9cf473 Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Wed, 2 Nov 2016 18:12:02 +0000 Subject: [PATCH] Ensure max size in not enforced for vectors Otherwise they can't be scaled up. Also move svgMaxSize code to comment as it isn't used yet. Change-Id: I7af2bc91524e832555b66f090a671672cd14f294 --- modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js b/modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js index 4e055568bb..3010986253 100644 --- a/modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js +++ b/modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js @@ -29,8 +29,6 @@ ve.dm.MWImageNode = function VeDmMWImageNode() { // Use 'bitmap' as default media type until we can // fetch the actual media type from the API this.mediaType = 'BITMAP'; - // Get wiki defaults - this.svgMaxSize = mw.config.get( 'wgVisualEditorConfig' ).svgMaxSize; // Initialize this.constructor.static.syncScalableToType( @@ -155,9 +153,13 @@ ve.dm.MWImageNode.static.syncScalableToType = function ( type, mediaType, scalab } else { scalable.setEnforcedMax( false ); } + } else { + // EnforcedMax may have previously been set to true + scalable.setEnforcedMax( false ); } // TODO: Some day, when svgMaxSize works properly in MediaWiki - // we can add it back as max dimension consideration. + // we can add it back as max dimension consideration: + // mw.config.get( 'wgVisualEditorConfig' ).svgMaxSize }; /**