From dd6b28d886fa344d477aec9e80a4d6056b26d3a1 Mon Sep 17 00:00:00 2001 From: Bruno Heridet Date: Sat, 16 Feb 2013 10:28:17 +0000 Subject: [PATCH] used default step values for SpinButtons git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2404 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/svg-editor.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/editor/svg-editor.js b/editor/svg-editor.js index 7af0d1fb..f95316e1 100644 --- a/editor/svg-editor.js +++ b/editor/svg-editor.js @@ -1038,7 +1038,7 @@ if (ext.context_tools) { $.each(ext.context_tools, function(i, tool) { // Add select tool - var cont_id = tool.container_id?(' id="' + tool.container_id + '"') : ''; + var cont_id = tool.container_id ? (' id="' + tool.container_id + '"') : ''; var panel = $('#' + tool.panel); // create the panel if it doesn't exist @@ -4204,12 +4204,13 @@ } }); - $('#rect_rx').SpinButton({ min: 0, max: 1000, step: 1, callback: changeRectRadius }); - $('#stroke_width').SpinButton({ min: 0, max: 99, step: 1, smallStep: 0.1, callback: changeStrokeWidth }); + // init SpinButtons + $('#rect_rx').SpinButton({ min: 0, max: 1000, callback: changeRectRadius }); + $('#stroke_width').SpinButton({ min: 0, max: 99, smallStep: 0.1, callback: changeStrokeWidth }); $('#angle').SpinButton({ min: -180, max: 180, step: 5, callback: changeRotationAngle }); - $('#font_size').SpinButton({ step: 1, min: 0.001, stepfunc: stepFontSize, callback: changeFontSize }); - $('#group_opacity').SpinButton({ step: 5, min: 0, max: 100, callback: changeOpacity }); - $('#blur').SpinButton({ step: .1, min: 0, max: 10, callback: changeBlur }); + $('#font_size').SpinButton({ min: 0.001, stepfunc: stepFontSize, callback: changeFontSize }); + $('#group_opacity').SpinButton({ min: 0, max: 100, step: 5, callback: changeOpacity }); + $('#blur').SpinButton({ min: 0, max: 10, step: .1, callback: changeBlur }); $('#zoom').SpinButton({ min: 0.001, max: 10000, step: 50, stepfunc: stepZoom, callback: changeZoom }) // Set default zoom .val(svgCanvas.getZoom() * 100);