From 575e8407e6b5cfee0124206de547ac674672e8f3 Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Mon, 3 Nov 2014 15:22:34 +0000 Subject: [PATCH] VisualEditor: Add selection restriction to command Depends on I88f3d04 in VE. Change-Id: I33006574d86daa6ed2568b631a62e063c9f98542 --- modules/VisualEditor/ve.ui.MWMathInspectorTool.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/VisualEditor/ve.ui.MWMathInspectorTool.js b/modules/VisualEditor/ve.ui.MWMathInspectorTool.js index 26720ff..f14a267 100644 --- a/modules/VisualEditor/ve.ui.MWMathInspectorTool.js +++ b/modules/VisualEditor/ve.ui.MWMathInspectorTool.js @@ -30,5 +30,8 @@ ve.ui.MWMathInspectorTool.static.commandName = 'math'; ve.ui.toolFactory.register( ve.ui.MWMathInspectorTool ); ve.ui.commandRegistry.register( - new ve.ui.Command( 'math', 'window', 'open', 'math' ) + new ve.ui.Command( + 'math', 'window', 'open', + { args: ['math'], supportedSelections: ['linear'] } + ) );